📄 form14.frm
字号:
VERSION 5.00
Begin VB.Form Form14
Caption = "挂号"
ClientHeight = 3810
ClientLeft = 60
ClientTop = 450
ClientWidth = 6225
LinkTopic = "Form3"
ScaleHeight = 3810
ScaleWidth = 6225
StartUpPosition = 1 '所有者中心
Begin VB.TextBox Text1
Height = 375
Left = 3600
TabIndex = 10
Text = "Text1"
Top = 1080
Visible = 0 'False
Width = 255
End
Begin VB.CommandButton Command3
Caption = "..."
Height = 375
Left = 3120
TabIndex = 9
Top = 1080
Width = 495
End
Begin VB.ComboBox Combo1
Height = 300
ItemData = "Form14.frx":0000
Left = 1440
List = "Form14.frx":0002
TabIndex = 8
Text = "Combo1"
Top = 240
Width = 1695
End
Begin VB.TextBox Text3
Height = 375
Left = 1440
TabIndex = 6
Text = "Text1"
Top = 1800
Width = 1695
End
Begin VB.TextBox Text2
Height = 375
Left = 1440
TabIndex = 4
Text = "Text1"
Top = 1080
Width = 1695
End
Begin VB.CheckBox ck
Caption = "连续增加"
Height = 375
Left = 240
TabIndex = 3
Top = 2640
Value = 1 'Checked
Width = 1335
End
Begin VB.CommandButton Command2
Caption = "退 出"
Height = 495
Left = 4320
TabIndex = 2
Top = 2520
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "保 存"
Height = 495
Left = 2760
TabIndex = 1
Top = 2520
Width = 1215
End
Begin VB.Label Label3
Caption = "挂号费"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 480
TabIndex = 7
Top = 1800
Width = 975
End
Begin VB.Label Label2
Caption = "医 师"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 480
TabIndex = 5
Top = 1080
Width = 975
End
Begin VB.Label label1
Caption = "类 型"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 480
TabIndex = 0
Top = 240
Width = 975
End
End
Attribute VB_Name = "Form14"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim t_ As String
Public Sub setType(t As String)
t_ = t
End Sub
Private Sub Command1_Click()
Dim c_gl As String
If Trim(Text1) = "" Then
Text1.SetFocus
End If
If t_ = "add" And Text1.Text <> "init" Then
c_gl = Now()
c_gl = Replace(c_gl, "-", "")
c_gl = Replace(c_gl, ":", "")
c_gl = Replace(c_gl, " ", "")
Call ExcuteSql(rec_gh, "select * from med_gl")
If rec_gh.State = adStateOpen Then
rec_gh.AddNew
rec_gh.Fields("类型") = Trim(Combo1.Text)
rec_gh.Fields("医师ID") = Trim(Text1)
rec_gh.Fields("挂号费") = Trim(Text3)
rec_gh.Fields("编号") = Trim(c_gl)
rec_gh.Update
MsgBox ("你的挂号号码:" & c_gl)
Text1 = "init"
Text2 = ""
Text3 = ""
End If
End If
If t_ = "modify" Then
If rec_gh.State = adStateOpen Then
rec_gh.Fields("类型") = Trim(Combo1.Text)
rec_gh.Fields("医师ID") = Trim(Text1)
rec_gh.Fields("挂号费") = Trim(Text3)
rec_gh.Update
rec_gh.Update
End If
End If
If ck.Value <> 1 Then
Unload Me
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Command3_Click()
Dim f As New Form15
Call f.setID(Text1, Text2)
f.Show vbModal
End Sub
Private Sub Form_Load()
't_ = "add"
Text1 = "init"
Text2 = ""
Text3 = ""
Combo1.AddItem "普通门诊"
Combo1.AddItem "急 诊"
Combo1.ListIndex = 0
If t_ = "modify" Then
If rec_gh.State = adStateOpen And Not rec_gh.EOF And Not rec_gh.BOF Then
Text1 = rec_gh.Fields("药品单位")
End If
ck.Visible = False
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -