📄 frminquery.frm
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form InQuery
BorderStyle = 1 'Fixed Single
Caption = "查询入库信息(设计者:陈晓坡 杨建伟)"
ClientHeight = 6705
ClientLeft = 45
ClientTop = 330
ClientWidth = 9510
Icon = "frmInQuery.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 6705
ScaleWidth = 9510
StartUpPosition = 2 '屏幕中心
Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1
Height = 3705
Left = 210
TabIndex = 24
Top = 2880
Width = 8085
_ExtentX = 14261
_ExtentY = 6535
_Version = 393216
End
Begin VB.CommandButton Command2
Caption = "退出"
Height = 435
Left = 8430
TabIndex = 17
Top = 1110
Width = 945
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 435
Left = 8430
TabIndex = 16
Top = 300
Width = 945
End
Begin VB.Frame Frame1
Caption = "材料进库信息"
Height = 2595
Left = 150
TabIndex = 0
Top = 120
Width = 8115
Begin VB.TextBox Text1
Height = 375
Left = 1560
TabIndex = 29
Top = 405
Width = 1545
End
Begin VB.TextBox Text2
Height = 375
Left = 1560
TabIndex = 28
Top = 952
Width = 1545
End
Begin VB.TextBox Text3
Height = 375
Left = 1560
TabIndex = 27
Top = 1499
Width = 1545
End
Begin VB.TextBox Text4
Height = 375
Left = 1560
TabIndex = 26
Top = 2046
Width = 1545
End
Begin VB.TextBox Text5
Height = 375
Left = 4650
TabIndex = 25
Top = 405
Width = 1545
End
Begin VB.OptionButton Option6
Caption = "进库日期"
Height = 345
Left = 3300
TabIndex = 23
Top = 960
Width = 1065
End
Begin VB.OptionButton Option5
Caption = "规格型号"
Height = 345
Left = 3300
TabIndex = 22
Top = 420
Width = 1215
End
Begin VB.OptionButton Option4
Caption = "材料名称"
Height = 345
Left = 210
TabIndex = 21
Top = 2061
Width = 1215
End
Begin VB.OptionButton Option3
Caption = "材料编码"
Height = 345
Left = 210
TabIndex = 20
Top = 1514
Width = 1215
End
Begin VB.OptionButton Option2
Caption = "发票号码"
Height = 345
Left = 210
TabIndex = 19
Top = 967
Width = 1215
End
Begin VB.OptionButton Option1
Caption = "进库单号码"
Height = 345
Left = 210
TabIndex = 18
Top = 420
Width = 1215
End
Begin VB.Frame Frame2
Caption = "进库时间"
Height = 1395
Left = 4440
TabIndex = 1
Top = 960
Width = 3525
Begin VB.ComboBox Combo6
Height = 315
Left = 2550
TabIndex = 14
Top = 840
Width = 645
End
Begin VB.ComboBox Combo5
Height = 315
Left = 1680
TabIndex = 12
Top = 840
Width = 645
End
Begin VB.ComboBox Combo4
Height = 315
Left = 510
TabIndex = 10
Top = 840
Width = 945
End
Begin VB.ComboBox Combo3
Height = 315
Left = 2550
TabIndex = 7
Top = 300
Width = 645
End
Begin VB.ComboBox Combo2
Height = 315
Left = 1680
TabIndex = 5
Top = 315
Width = 645
End
Begin VB.ComboBox Combo1
Height = 315
Left = 510
TabIndex = 3
Top = 315
Width = 945
End
Begin VB.Label Label8
Caption = "日"
Height = 285
Left = 3210
TabIndex = 15
Top = 900
Width = 255
End
Begin VB.Label Label7
Caption = "月"
Height = 285
Left = 2340
TabIndex = 13
Top = 870
Width = 255
End
Begin VB.Label Label6
Caption = "年"
Height = 285
Left = 1500
TabIndex = 11
Top = 870
Width = 255
End
Begin VB.Label Label5
Caption = "到:"
Height = 285
Left = 180
TabIndex = 9
Top = 840
Width = 375
End
Begin VB.Label Label4
Caption = "日"
Height = 285
Left = 3210
TabIndex = 8
Top = 330
Width = 255
End
Begin VB.Label Label3
Caption = "月"
Height = 285
Left = 2340
TabIndex = 6
Top = 330
Width = 255
End
Begin VB.Label Label2
Caption = "年"
Height = 285
Left = 1500
TabIndex = 4
Top = 330
Width = 255
End
Begin VB.Label Label1
Caption = "从:"
Height = 285
Left = 180
TabIndex = 2
Top = 330
Width = 375
End
End
End
End
Attribute VB_Name = "InQuery"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim Mydb As Database
Dim Myrs1 As Recordset
Dim Myrs2 As Recordset
Private Sub Command1_Click()
Dim mrc As Recordset
Dim str1 As String, str2 As String
If Option1.Value = True Then
If Text1.Text = "" Then
MsgBox "请正确填写进库单号码!", vbOKOnly + vbExclamation, "信息提示"
Text1.SetFocus
Exit Sub
Else
Set Myrs1 = Mydb.OpenRecordset("select * from inlib where 进库单号码='" & Trim(Text1) & "'")
MSFlexGrid1.Clear
TableInit
If Myrs1.RecordCount >= 1 Then
Set Myrs2 = Mydb.OpenRecordset("select * from inlibdetail,goods where 进库单号码='" & Trim(Text1) & "' And GoodsID = 材料编码")
While Myrs2.EOF = False
MSFlexGrid1.Rows = MSFlexGrid1.Rows + 1
MSFlexGrid1.Row = MSFlexGrid1.Rows - 1
MSFlexGrid1.Col = 0
MSFlexGrid1.Text = Myrs1.Fields("进库单号码")
MSFlexGrid1.Col = 1
MSFlexGrid1.Text = Myrs1.Fields("发票号码")
MSFlexGrid1.Col = 2
MSFlexGrid1.Text = Myrs1.Fields("进库日期")
MSFlexGrid1.Col = 3
If IsNull(Myrs1.Fields("经办人")) Then
MSFlexGrid1.Text = ""
Else
MSFlexGrid1.Text = Myrs1.Fields("经办人")
End If
MSFlexGrid1.Col = 4
If IsNull(Myrs1.Fields("保管人")) Then
MSFlexGrid1.Text = ""
Else
MSFlexGrid1.Text = Myrs1.Fields("保管人")
End If
MSFlexGrid1.Col = 5
MSFlexGrid1.Text = Myrs2.Fields("goodsid")
MSFlexGrid1.Col = 6
MSFlexGrid1.Text = Myrs2.Fields("goodsname")
MSFlexGrid1.Col = 7
MSFlexGrid1.Text = Myrs2.Fields("type")
MSFlexGrid1.Col = 8
MSFlexGrid1.Text = Myrs2.Fields("unit")
MSFlexGrid1.Col = 9
MSFlexGrid1.Text = Myrs2.Fields("数量")
MSFlexGrid1.Col = 10
MSFlexGrid1.Text = Format(Myrs2.Fields("单价"), "#0.00")
MSFlexGrid1.Col = 11
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -