stuff_query_stock.frm
来自「这是一个医院管理系统中的院长查询模块」· FRM 代码 · 共 723 行 · 第 1/2 页
FRM
723 行
Index = 0
Left = 2835
TabIndex = 6
Top = 240
Width = 1215
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
ForeColor = &H00000000&
Height = 240
Index = 0
Left = 150
TabIndex = 5
Top = 255
Width = 1080
End
End
Begin VB.Data data_source
Caption = "Data1"
Connect = "Access"
DatabaseName = ""
DefaultCursorType= 0 'DefaultCursor
DefaultType = 2 'UseODBC
Exclusive = 0 'False
Height = 345
Left = 1260
Options = 0
ReadOnly = 0 'False
RecordsetType = 2 'Snapshot
RecordSource = ""
Top = 2565
Visible = 0 'False
Width = 1215
End
Begin ResizeLibCtl.ReSize ReSize1
Left = 1980
Top = 4350
_Version = 196608
_ExtentX = 741
_ExtentY = 741
_StockProps = 64
Enabled = -1 'True
Enabled = -1 'True
FormMinWidth = 0
FormMinHeight = 0
AutoCenterFormOnLoad= -1 'True
FormDesignHeight= 6825
FormDesignWidth = 9510
End
Begin MSRDC.MSRDC select_data
Height = 435
Left = 3315
Top = 3330
Visible = 0 'False
Width = 2070
_ExtentX = 3651
_ExtentY = 767
_Version = 393216
Options = 0
CursorDriver = 1
BOFAction = 0
EOFAction = 0
RecordsetType = 1
LockType = 3
QueryType = 0
Prompt = 3
Appearance = 1
QueryTimeout = 30
RowsetSize = 100
LoginTimeout = 15
KeysetSize = 0
MaxRows = 0
ErrorThreshold = -1
BatchSize = 15
BackColor = -2147483643
ForeColor = -2147483640
Enabled = -1 'True
ReadOnly = 0 'False
Appearance = -1 'True
DataSourceName = ""
RecordSource = ""
UserName = ""
Password = ""
Connect = ""
LogMessages = ""
Caption = "MSRDC1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin MSDBGrid.DBGrid show_data
Bindings = "stuff_query_stock.frx":034B
Height = 5280
Left = 60
OleObjectBlob = "stuff_query_stock.frx":0361
TabIndex = 7
Top = 1440
Width = 9360
End
End
Attribute VB_Name = "stuff_query_stock"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim mkind_code As String
Dim great_id As String
Dim little_id As String
Private Sub browse_com_Click()
spell_head_Change
End Sub
Private Sub Form_Load()
select_data.DataSourceName = dbfname
select_data.Connect = dbfstr
data_source.DatabaseName = dbfname
data_source.Connect = dbfstr
data_source.RecordSource = "select * from stuff_yielder order by yielder_name"
stuff_source.ListField = "yielder_name"
data_great.DatabaseName = dbfname
data_great.Connect = dbfstr
data_little.DatabaseName = dbfname
data_little.Connect = dbfstr
data_little.RecordSource = "select * from stuff_littlekind WHERE G_id=''"
data_little.Refresh
show_little.ListField = "L_NAME"
stuff_kind.AddItem "卫生材料"
stuff_kind.AddItem "卫杂材料"
stuff_kind.AddItem "其他材料"
stuff_kind.Text = "卫生材料"
'''''隐藏主菜单''''''''''''''
Form3.Visible = False
Form3.Enabled = False
'''''''''''''''''''''''
End Sub
Private Sub Form_Unload(Cancel As Integer)
Form3.Enabled = True
Form3.Visible = True
End Sub
Private Sub money_down_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
spell_head_Change
money_up.SetFocus
End If
End Sub
Private Sub money_down_KeyPress(KeyAscii As Integer)
If (KeyAscii < Asc("0") Or KeyAscii > Asc("9")) And KeyAscii <> 8 Then
KeyAscii = 0
End If
End Sub
Private Sub money_up_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
spell_head_Change
stuff_position.SetFocus
End If
End Sub
Private Sub money_up_KeyPress(KeyAscii As Integer)
If (KeyAscii < Asc("0") Or KeyAscii > Asc("9")) And KeyAscii <> 8 Then
KeyAscii = 0
End If
End Sub
Private Sub quit_com_Click()
Unload Me
End Sub
Private Sub show_great_Change()
great_id = "%"
If Not (show_great.Text = "") Then
Dim db As Database
Dim rs As Recordset
opendb db, rs, "select * from stuff_greatkind where G_NAME = '" + show_great.Text + "'", False
great_id = rs!G_id
rs.Close
db.Close
show_little = ""
data_little.DatabaseName = dbfname
data_little.Connect = dbfstr
data_little.RecordSource = "select * from stuff_littlekind WHERE G_id='" + great_id + "'"
data_little.Refresh
show_little.ListField = "L_NAME"
little_id = great_id + "%"
spell_head.Text = ""
spell_head_Change
Else
opendb db, rs, "select * from stuff_greatkind where G_NAME like ' '", False
rs.Close
db.Close
End If
End Sub
Private Sub show_great_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
show_little.SetFocus
End If
End Sub
Private Sub show_little_Change()
Dim db As Database
Dim rs As Recordset
If show_great <> "" And show_little <> "" Then
opendb db, rs, "select * from stuff_littlekind where G_id='" + great_id + "'and L_NAME = '" + show_little.Text + "'", False
little_id = rs!L_id
rs.Close
db.Close
spell_head.Text = ""
spell_head_Change
End If
End Sub
Private Sub show_little_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
money_down.SetFocus
End If
End Sub
Private Sub spell_head_Change()
Dim db As Database
Dim rs As Recordset
Dim this_source As String
Dim this_position As String
Dim spell_on As String
Dim this_up As Currency
Dim this_down As Currency
If Trim(spell_head.Text) = "" Then
spell_on = "1"
this_code = "%"
Else
If Asc(Left(spell_head.Text, 2)) < 0 Then
this_code = "%" + Trim(spell_head.Text) + "%"
spell_on = "3"
Else
If Val(spell_head.Text) > 0 And Val(spell_head.Text) < 99999 Then
this_code = Left(Trim(spell_head.Text), 5)
spell_on = "1"
Else
this_code = "%" + Trim(spell_head.Text) + "%"
spell_on = "2"
End If
End If
End If
If Trim(money_down.Text) = "" Then
this_down = 0
Else
this_down = Val(money_down.Text)
End If
If Trim(money_up.Text) = "" Then
this_up = 999999999
Else
this_up = Val(money_up.Text)
End If
If Trim(stuff_source.Text) = "" Then
this_source = "%"
Else
opendb db, rs, "select * from stuff_yielder where yielder_name='" + stuff_source.Text + "'"
this_source = rs!yielder_id
rs.Close
db.Close
End If
If Trim(stuff_position) = "" Then
this_position = "%"
Else
this_position = Format(stuff_position, "0000")
End If
select_data.SQL = "stuff_query_stock '" + mkind_code + "','" + great_id + "','" + little_id + "'," + CStr(this_up) + "," + CStr(this_down) + ",'" + this_source + "','" + this_position + "','" + this_code + "','" + spell_on + "'"
select_data.Refresh
End Sub
Private Sub spell_head_KeyPress(KeyAscii As Integer)
If KeyAscii = Asc("'") Then
KeyAscii = 0
End If
End Sub
Private Sub stuff_kind_Click()
If stuff_kind.Text = "卫生材料" Then mkind_code = "H"
If stuff_kind.Text = "卫杂材料" Then mkind_code = "I"
If stuff_kind.Text = "其他材料" Then mkind_code = "J"
data_great.RecordSource = "select * from stuff_greatkind where g_kind='" + mkind_code + "' order by G_id"
data_great.Refresh
show_great.ListField = "G_NAME"
great_id = "%"
little_id = "%"
money_up.Text = ""
money_down.Text = ""
spell_head.Text = ""
stuff_position.Text = ""
show_great.Text = ""
show_little.Text = ""
stuff_source.Text = ""
End Sub
Private Sub stuff_kind_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
stuff_source.SetFocus
End If
End Sub
Private Sub stuff_position_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
spell_head_Change
spell_head.SetFocus
End If
End Sub
Private Sub stuff_position_KeyPress(KeyAscii As Integer)
If (KeyAscii < Asc("0") Or KeyAscii > Asc("9")) And KeyAscii <> 8 Then
KeyAscii = 0
End If
End Sub
Private Sub stuff_source_Change()
spell_head_Change
End Sub
Private Sub stuff_source_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
show_great.SetFocus
End If
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?