📄 销售信息记录.frm
字号:
End
Begin VB.TextBox Text1
DataField = "SaleNo"
DataSource = "Adodc1"
Height = 375
Left = 1260
TabIndex = 2
Top = 240
Width = 1155
End
Begin VB.Label Label4
Caption = "总金额:"
Height = 255
Left = 2640
TabIndex = 8
Top = 840
Width = 915
End
Begin VB.Label Label3
Caption = "销售员编码:"
Height = 255
Left = 120
TabIndex = 6
Top = 900
Width = 1095
End
Begin VB.Label Label2
Caption = "销售日期:"
Height = 255
Left = 2580
TabIndex = 4
Top = 300
Width = 1035
End
Begin VB.Label Label1
Caption = "销售编码:"
Height = 255
Left = 120
TabIndex = 3
Top = 300
Width = 1035
End
End
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "销售信息记录.frx":0000
Height = 3135
Left = 240
TabIndex = 0
Top = 4980
Width = 8355
_ExtentX = 14737
_ExtentY = 5530
_Version = 393216
HeadLines = 1
RowHeight = 15
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 2
BeginProperty Column00
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 600
Top = 9000
Visible = 0 'False
Width = 1755
_ExtentX = 3096
_ExtentY = 582
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= 3
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "DSN=medicine"
OLEDBString = ""
OLEDBFile = ""
DataSourceName = "medicine"
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from salemaintable,salechildtable"
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 Label12
Caption = "销售信息总表:"
Height = 195
Left = 300
TabIndex = 25
Top = 4740
Width = 3555
End
End
Attribute VB_Name = "销售信息记录"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
Frame1.Enabled = True
Frame2.Enabled = True
Option1.Enabled = True
Option2.Enabled = True
Option3.Enabled = True
If Option1 Then
Adodc1.RecordSource = " select saleno as 销售编码,amount as 总额,saledate as 销售日期,workno as 销售员编号 from salemaintable where saleno='" & Trim(Text12.Text) & "'"
Adodc1.Refresh
End If
If Option2 Then
Adodc1.RecordSource = " select saleno as 销售编码,medicinecode AS 药品编码,medicinename as 药品名称,number as 数量,unit as 单位,price as 单价,amount as 总额 from salechildtable where saleno='" & Trim(Text12.Text) & "'"
Adodc1.Refresh
End If
If Option3 Then
Adodc1.RecordSource = " select salemaintable.saleno as 销售编码,medicinecode AS 药品编码,medicinename as 药品名称,number as 数量,unit as 单位,price as 单价,salechildtable.amount as 总额,saledate as 销售日期,workno as 销售员编号 from salemaintable,salechildtable where salemaintable.saleno=salechildtable.saleno "
Adodc1.Refresh
Text12.Visible = False
Label13.Visible = False
End If
If Adodc1.Recordset.EOF Then
MsgBox "无次信息", , "提示"
Adodc1.RecordSource = " select distinct salemaintable.saleno as 销售编码,medicinecode AS 药品编码,medicinename as 药品名称,number as 数量,unit as 单位,price as 单价,salechildtable.amount as 总额,saledate as 销售日期,workno as 销售员编号 from salemaintable,salechildtable where salemaintable.saleno=salechildtable.saleno "
Adodc1.Refresh
End If
End Sub
Private Sub Command2_Click()
Frame3.Visible = True
End Sub
Private Sub Command3_Click()
Adodc1.Recordset.MovePrevious
If Adodc1.Recordset.BOF Then
Adodc1.Recordset.MoveFirst
MsgBox "当前记录为第一条", , "提示"
End If
End Sub
Private Sub Command4_Click()
Adodc1.Recordset.MoveNext
If Adodc1.Recordset.EOF Then
Adodc1.Recordset.MoveLast
MsgBox "当前记录为最后一条", , "提示"
End If
End Sub
Private Sub Form_Load()
Adodc1.RecordSource = " select distinct salemaintable.saleno as 销售编码,medicinecode AS 药品编码,medicinename as 药品名称,number as 数量,unit as 单位,price as 单价,salechildtable.amount as 总额,saledate as 销售日期,workno as 销售员编号 from salemaintable,salechildtable where salemaintable.saleno=salechildtable.saleno "
Adodc1.Refresh
End Sub
Private Sub Option1_Click()
Frame1.Enabled = True
Frame2.Enabled = False
Option2.Enabled = False
Option3.Enabled = False
Text12.Visible = True
Label13.Visible = True
Text12.SetFocus
End Sub
Private Sub Option2_Click()
Frame1.Enabled = False
Frame2.Enabled = True
Option1.Enabled = False
Option3.Enabled = False
Text12.Visible = True
Label13.Visible = True
Text12.SetFocus
End Sub
Private Sub Option3_Click()
Frame1.Enabled = True
Frame2.Enabled = True
Option1.Enabled = False
Option2.Enabled = False
Text12.Visible = True
Label13.Visible = True
Text12.SetFocus
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -