?? chffrm.frm
字號(hào):
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 = 33
Top = 5925
Width = 840
End
End
Begin VB.Frame Frame3
Caption = "處方信息錄入"
ForeColor = &H00808000&
Height = 615
Left = 120
TabIndex = 4
Top = 960
Width = 8175
Begin VB.TextBox Text5
Height = 300
IMEMode = 2 'OFF
Left = 7320
MaxLength = 3
TabIndex = 20
Text = "Text5"
Top = 200
Width = 735
End
Begin VB.ComboBox Combo3
Height = 300
ItemData = "chffrm.frx":0000
Left = 7440
List = "chffrm.frx":0028
TabIndex = 19
Text = "Combo3"
Top = 0
Visible = 0 'False
Width = 855
End
Begin VB.TextBox Text4
Height = 300
IMEMode = 2 'OFF
Left = 2760
TabIndex = 18
Text = "Text4"
Top = 200
Width = 3735
End
Begin VB.ComboBox Combo2
Height = 300
Left = 840
TabIndex = 17
Text = "Combo2"
Top = 200
Width = 1095
End
Begin VB.Label Label9
AutoSize = -1 'True
Caption = "數(shù)量:"
Height = 180
Left = 6720
TabIndex = 16
Top = 260
Width = 540
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "名稱:"
Height = 180
Left = 2160
TabIndex = 15
Top = 260
Width = 540
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "科別:"
Height = 180
Left = 240
TabIndex = 14
Top = 260
Width = 540
End
End
Begin VB.Frame Frame2
Caption = "患者信息"
ForeColor = &H00008000&
Height = 615
Left = 120
TabIndex = 3
Top = 240
Width = 8175
Begin VB.TextBox Text3
Height = 270
IMEMode = 1 'ON
Left = 5760
TabIndex = 13
Text = "Text3"
Top = 200
Width = 2295
End
Begin VB.TextBox Text2
Height = 270
IMEMode = 2 'OFF
Left = 4290
MaxLength = 2
TabIndex = 12
Text = "Text2"
Top = 200
Width = 735
End
Begin VB.ComboBox Combo1
Height = 300
ItemData = "chffrm.frx":005E
Left = 2703
List = "chffrm.frx":0068
TabIndex = 11
Text = "Combo1"
Top = 200
Width = 855
End
Begin VB.TextBox Text1
Height = 300
IMEMode = 1 'ON
Left = 876
TabIndex = 7
Text = "Text1"
Top = 200
Width = 1095
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "單位:"
Height = 180
Left = 5280
TabIndex = 10
Top = 260
Width = 540
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "年齡:"
Height = 180
Left = 3720
TabIndex = 9
Top = 260
Width = 540
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "性別:"
Height = 180
Left = 2190
TabIndex = 8
Top = 260
Width = 540
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "姓名:"
Height = 180
Left = 240
TabIndex = 6
Top = 260
Width = 540
End
End
End
Begin VB.Label Label19
AutoSize = -1 'True
Caption = "Label19"
ForeColor = &H000000FF&
Height = 180
Left = 840
TabIndex = 70
Top = 360
Width = 630
End
Begin VB.Label Label18
AutoSize = -1 'True
Caption = "label18"
ForeColor = &H000000FF&
Height = 180
Left = 120
TabIndex = 69
Top = 360
Width = 630
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "卓資縣人民醫(yī)院門診處方劃價(jià)"
BeginProperty Font
Name = "隸書"
Size = 21.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 435
Index = 1
Left = 2355
TabIndex = 1
Top = 15
Width = 6045
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "卓資縣人民醫(yī)院門診處方劃價(jià)"
BeginProperty Font
Name = "隸書"
Size = 21.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF8080&
Height = 435
Index = 0
Left = 2400
TabIndex = 0
Top = 60
Width = 6045
End
End
Attribute VB_Name = "chffrm"
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 Combo3_Click()
Text5.SetFocus
End Sub
Private Sub Combo3_KeyPress(KeyAscii As Integer)
If KeyAscii = 8 Then
Text4.SetFocus
Text4.SelStart = 0
Text4.SelLength = Len(Text4.Text)
End If
If KeyAscii = 13 Then Text5.SetFocus
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
Text1.SetFocus
For h = 0 To 13
Label17(h).Caption = ""
Label17(h).Visible = False
Next h
Command1.Enabled = False
Command2.Enabled = False
Command3.Enabled = True
Exit Sub
er:
MsgBox "網(wǎng)絡(luò)出現(xiàn)故障,請(qǐng)檢查網(wǎng)絡(luò)連接!或出現(xiàn)其他未知錯(cuò)誤!"
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 "請(qǐng)不要忘了選擇“醫(yī)師”同志好嗎?"
Exit Sub
End If
Else
MsgBox "沒有數(shù)據(jù)可保存"
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 19
If Label17(k - 6).Caption <> "" Then
Data1.Recordset.Fields(k) = Str(Val(Label17(k - 6).Caption))
Else
Data1.Recordset.Fields(k) = 0
End If
Next k
i = 0 '輸入藥品名稱、藥品單位、數(shù)量及藥品單價(jià)
h = 20
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 < 96 Then
For hh = h To 96 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("合計(jì)") = Val(Label20.Caption)
Data1.Recordset.Fields("醫(yī)師") = Combo4.Text
If Text6.Text <> "" Then
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -