📄 gnhjfrm.frm
字号:
Top = 240
Width = 1575
End
Begin VB.ListBox List3
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 5100
Left = 5400
TabIndex = 8
Top = 240
Width = 855
End
Begin VB.ListBox List2
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 5100
Left = 4560
TabIndex = 7
Top = 240
Width = 735
End
Begin VB.ListBox List1
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 5100
Left = 120
TabIndex = 6
Top = 240
Width = 4335
End
End
Begin VB.Label Label15
AutoSize = -1 'True
Caption = "日期:"
Height = 180
Left = 6300
TabIndex = 18
Top = 5955
Width = 540
End
Begin VB.Label Label14
AutoSize = -1 'True
Caption = "检药:"
Height = 180
Left = 4320
TabIndex = 14
Top = 5955
Width = 540
End
Begin VB.Label Label13
AutoSize = -1 'True
Caption = "调剂:"
Height = 180
Left = 2280
TabIndex = 13
Top = 5950
Width = 540
End
Begin VB.Label Label12
AutoSize = -1 'True
Caption = "医师:"
Height = 180
Left = 240
TabIndex = 12
Top = 5950
Width = 540
End
Begin VB.Label Label11
AutoSize = -1 'True
Caption = "Label11"
BeginProperty DataFormat
Type = 0
Format = "gg yyyy""斥"" MM""岿"" dd""老"""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 6820
TabIndex = 11
Top = 5925
Width = 840
End
End
Begin VB.Label Label8
AutoSize = -1 'True
Caption = "处置:"
Height = 180
Left = 360
TabIndex = 84
Top = 1605
Width = 540
End
End
Begin VB.Label Label19
AutoSize = -1 'True
Caption = "Label19"
ForeColor = &H000000FF&
Height = 180
Left = 840
TabIndex = 20
Top = 360
Width = 630
End
Begin VB.Label Label18
AutoSize = -1 'True
Caption = "label18"
ForeColor = &H000000FF&
Height = 180
Left = 120
TabIndex = 19
Top = 360
Width = 630
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "卓资县人民医院病房处方划价"
BeginProperty Font
Name = "隶书"
Size = 21.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF00FF&
Height = 435
Index = 1
Left = 2355
TabIndex = 1
Top = 15
Width = 6045
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "卓资县人民医院病房处方划价"
BeginProperty Font
Name = "隶书"
Size = 21.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFF80&
Height = 435
Index = 0
Left = 2400
TabIndex = 0
Top = 60
Width = 6045
End
End
Attribute VB_Name = "gnhjfrm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim chfarr() As String
Dim mdbstr1 As String
Dim rc1 As Long
Private Sub Combo1_Click()
Text2.SetFocus
End Sub
Private Sub Combo1_KeyPress(KeyAscii As Integer)
KeyAscii = 0
End Sub
Private Sub Combo2_Click()
Adodc2.Refresh
Combo4.Clear
While Adodc2.Recordset.EOF = False
If Trim(Adodc2.Recordset.Fields(2)) = Trim(Combo2.Text) Then
Combo4.AddItem Adodc2.Recordset.Fields(1)
End If
Adodc2.Recordset.MoveNext
Wend
Text4.SetFocus
End Sub
Private Sub Combo2_KeyPress(KeyAscii As Integer)
KeyAscii = 0
End Sub
Private Sub Combo4_Click()
Text5.SetFocus
End Sub
Private Sub Combo4_KeyPress(KeyAscii As Integer)
KeyAscii = 0
End Sub
Private Sub Command1_Click()
On Error GoTo er
Data1.Refresh
cfbh = 0
While Data1.Recordset.EOF = False
cfbh = cfbh + 1
Data1.Recordset.MoveNext
Wend
Label19.Caption = cfbh + 1
Frame2.Enabled = True
For h = 0 To 19
Label17(h).Caption = ""
Label17(h).Visible = False
Next h
Text1.SetFocus
Command1.Enabled = False
Command2.Enabled = False
Command3.Enabled = True
Text8.Visible = True
Exit Sub
er:
MsgBox "网络出现故障,请检查网络连接!或出现其他未知错误!"
End Sub
Sub sel(d)
List1.Selected(d) = True
List2.Selected(d) = True
List3.Selected(d) = True
List4.Selected(d) = True
End Sub
Private Sub Command2_Click()
On Error GoTo er
If List1.ListCount - 1 >= 0 Then
If Combo4.Text = "" Then
MsgBox "请不要忘了选择“医师”同志好吗?"
Exit Sub
End If
Else
MsgBox "没有数据可保存!"
Exit Sub
End If
'开始添加记录
List5.Visible = False
Data1.Recordset.AddNew
Data1.Recordset.Fields(0) = Label19.Caption
If Combo2.Text <> "" Then
Data1.Recordset.Fields(1) = Combo2.Text
Else
Data1.Recordset.Fields(1) = "未知科室"
End If
Data1.Recordset.Fields(2) = Text1.Text
Data1.Recordset.Fields(3) = Combo1.Text
Data1.Recordset.Fields(4) = Text2.Text
If Text3.Text = "" Then
Data1.Recordset.Fields(5) = "未知单位"
Else
Data1.Recordset.Fields(5) = Text3.Text
End If
For k = 6 To 25
If Label17(k - 6).Caption <> "" Then
Data1.Recordset.Fields(k) = Val(Label17(k - 6).Caption)
Else
Data1.Recordset.Fields(k) = 0
End If
Next k
i = 0 '输入药品名称、药品单位、数量及药品单价
h = 26
While i <= List1.ListCount - 1
Data1.Recordset.Fields(h) = List1.List(i)
Data1.Recordset.Fields(h + 1) = List2.List(i)
Data1.Recordset.Fields(h + 2) = Val(List3.List(i))
Data1.Recordset.Fields(h + 3) = Val(List4.List(i))
i = i + 1
h = h + 4
Wend
If h < 105 Then
For hh = h To 105 Step 4
Data1.Recordset.Fields(hh) = ""
Data1.Recordset.Fields(hh + 1) = ""
Data1.Recordset.Fields(hh + 2) = 0
Data1.Recordset.Fields(hh + 3) = 0
Next hh
End If
Data1.Recordset.Fields("合计") = Val(Label20.Caption)
Data1.Recordset.Fields("医师") = Combo4.Text
If Text6.Text <> "" Then
Data1.Recordset.Fields("调剂") = Text6.Text
Else
Data1.Recordset.Fields("调剂") = ""
End If
If Text7.Text <> "" Then
Data1.Recordset.Fields("检药") = Text7.Text
Else
Data1.Recordset.Fields("检药") = ""
End If
Data1.Recordset.Fields("日期") = Label11.Caption
Data1.Recordset.Fields("收费") = "未"
Data1.Recordset.Fields("收费日期") = ""
Data1.Recordset.Fields("操作员") = czyxm
Data1.Recordset.Update
Command2.Enabled = False
Command4.Enabled = True
Exit Sub
er:
MsgBox "数据保存出现错误!请检查网络连接是否正常!或服务器共享不完全!", vbOKOnly + 16
End Sub
Private Sub Command3_Click()
List1.Clear
List2.Clear
List3.Clear
List4.Clear
If Text1.Text = "" Or Combo1.Text = "" Or Text2.Text = "" Then
MsgBox "您输入的患者数据不完整!"
If Text1.Text = "" Then
Text1.SetFocus
Else
If Combo1.Text = "" Then
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -