📄 shfcxfrm.frm
字号:
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc1门诊处方"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "Label3"
ForeColor = &H000000FF&
Height = 180
Left = 11520
TabIndex = 3
Top = 8280
Width = 540
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "(划价已收费)查询结果总额合计:"
ForeColor = &H000000FF&
Height = 180
Left = 8640
TabIndex = 2
Top = 8280
Width = 2880
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 = &H00404000&
Height = 435
Index = 0
Left = 5280
TabIndex = 1
Top = 15
Width = 3990
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 = &H00FFFF00&
Height = 435
Index = 1
Left = 4560
TabIndex = 0
Top = 45
Width = 3990
End
End
Attribute VB_Name = "shfcxfrm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim mdbstr3 As String
Private Sub Combo1_Click()
If Option2.Value = True Then
Data1.RecordSource = "select * from 门诊处方 where 操作员=" + "'" + Trim(Combo1.Text) + "'" & " and 收费='收'"
Data1.Refresh
zehj = 0
While Data1.Recordset.EOF = False
zehj = zehj + Val(Data1.Recordset.Fields("合计"))
Data1.Recordset.MoveNext
Wend
Adodc1.RecordSource = Data1.RecordSource
Adodc1.Refresh
Call disp8
Combo1.Visible = False
Option2.Value = False
End If
If Option5.Value = True Then
Data1.RecordSource = "select * from 病房处方 where 操作员=" + "'" + Trim(Combo1.Text) + "'" & " and 收费='收'"
Data1.Refresh
zehj = 0
While Data1.Recordset.EOF = False
zehj = zehj + Val(Data1.Recordset.Fields("合计"))
Data1.Recordset.MoveNext
Wend
Adodc1.RecordSource = Data1.RecordSource
Adodc1.Refresh
Call disp8
Combo1.Visible = False
Option5.Value = False
End If
If Option3.Value = True Then
Data1.RecordSource = "select * from 门诊处方 where 医师=" + "'" + Trim(Combo1.Text) + "'" & " and 收费='收'"
Data1.Refresh
zehj = 0
While Data1.Recordset.EOF = False
zehj = zehj + Val(Data1.Recordset.Fields("合计"))
Data1.Recordset.MoveNext
Wend
Adodc1.RecordSource = Data1.RecordSource
Adodc1.Refresh
Call disp8
Option3.Value = False
Combo1.Visible = False
End If
If Option6.Value = True Then
Data1.RecordSource = "select * from 病房处方 where 医师=" + "'" + Trim(Combo1.Text) + "'" & " and 收费='收'"
Data1.Refresh
zehj = 0
While Data1.Recordset.EOF = False
zehj = zehj + Val(Data1.Recordset.Fields("合计"))
Data1.Recordset.MoveNext
Wend
Adodc1.RecordSource = Data1.RecordSource
Adodc1.Refresh
Call disp8
Option6.Value = False
Combo1.Visible = False
End If
Label3.Caption = zehj & "元"
End Sub
Private Sub Combo1_KeyPress(KeyAscii As Integer)
KeyAscii = 0
End Sub
Private Sub Form_Activate()
On Error GoTo er
Option1.Value = False
Option2.Value = False
Option3.Value = False
Option4.Value = False
Option5.Value = False
Option6.Value = False
Data1.RecordSource = "select * from 门诊处方 where 收费='收'"
Data1.Refresh
zehj = 0
While Data1.Recordset.EOF = False
zehj = zehj + Val(Data1.Recordset.Fields(100))
Data1.Recordset.MoveNext
Wend
Label3.Caption = zehj & "元"
Adodc1.RecordSource = Data1.RecordSource
Adodc1.Refresh
Call disp8
Exit Sub
er:
MsgBox "服务器连接失败。不能进行数据查询!"
End Sub
Private Sub Form_Load()
On Error GoTo er
mdbstr3 = "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=" + dbstr
Adodc1.ConnectionString = mdbstr3
Adodc1.RecordSource = "病房处方"
Adodc1.Refresh
Data1.DatabaseName = dbstr
Data1.RecordSource = "门诊处方"
Data1.Refresh
Adodc2.ConnectionString = mdbstr3
Adodc2.RecordSource = "czy"
Adodc2.Refresh
Adodc3.ConnectionString = mdbstr3
Adodc3.RecordSource = "医师"
Adodc3.Refresh
Exit Sub
er:
MsgBox "服务器连接失败。不能进行数据查询!"
End Sub
Sub disp8()
DataGrid1.Columns(0).Width = 900
DataGrid1.Columns(1).Width = 1111
DataGrid1.Columns(3).Width = 500
DataGrid1.Columns(4).Width = 500
For k = 6 To 19
DataGrid1.Columns(k).Width = 700
Next k
For k = 20 To 99
DataGrid1.Columns(k).Visible = False
Next k
End Sub
Private Sub Option1_Click()
If Option1.Value = True Then
Combo1.Visible = False
Data1.RecordSource = "select * from 门诊处方 where 收费='收'"
Data1.Refresh
zehj = 0
While Data1.Recordset.EOF = False
zehj = zehj + Val(Data1.Recordset.Fields(100))
Data1.Recordset.MoveNext
Wend
Label3.Caption = zehj & "元"
Adodc1.RecordSource = Data1.RecordSource
Adodc1.Refresh
Call disp8
End If
End Sub
Private Sub Option2_Click()
If Option2.Value = True Then
Combo1.Top = Option2.Top + Option2.Height + 50
Combo1.Left = Option2.Left
Combo1.Visible = True
Combo1.Clear
Adodc2.Refresh
While Adodc2.Recordset.EOF = False
Combo1.AddItem Adodc2.Recordset.Fields(1)
Adodc2.Recordset.MoveNext
Wend
Combo1.SetFocus
End If
End Sub
Private Sub Option3_Click()
If Option3.Value = True Then
Combo1.Top = Option3.Top + Option3.Height + 50
Combo1.Left = Option3.Left
Combo1.Visible = True
Combo1.Clear
Adodc3.Refresh
While Adodc3.Recordset.EOF = False
Combo1.AddItem Adodc3.Recordset.Fields(1)
Adodc3.Recordset.MoveNext
Wend
Combo1.SetFocus
End If
End Sub
Private Sub Option4_Click()
If Option4.Value = True Then
Combo1.Visible = False
Data1.RecordSource = "select * from 病房处方 where 收费='收'"
Data1.Refresh
zehj = 0
While Data1.Recordset.EOF = False
zehj = zehj + Val(Data1.Recordset.Fields("合计"))
Data1.Recordset.MoveNext
Wend
Label3.Caption = zehj & "元"
Adodc1.RecordSource = Data1.RecordSource
Adodc1.Refresh
Call disp8
End If
End Sub
Private Sub Option5_Click()
If Option5.Value = True Then
Combo1.Top = Option5.Top + Option5.Height + 50
Combo1.Left = Option5.Left
Combo1.Visible = True
Combo1.Clear
Adodc2.Refresh
While Adodc2.Recordset.EOF = False
Combo1.AddItem Adodc2.Recordset.Fields(1)
Adodc2.Recordset.MoveNext
Wend
Combo1.SetFocus
End If
End Sub
Private Sub Option6_Click()
If Option6.Value = True Then
Combo1.Top = Option6.Top + Option6.Height + 50
Combo1.Left = Option6.Left
Combo1.Visible = True
Combo1.Clear
Adodc3.Refresh
While Adodc3.Recordset.EOF = False
Combo1.AddItem Adodc3.Recordset.Fields(1)
Adodc3.Recordset.MoveNext
Wend
Combo1.SetFocus
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -