?? form4.frm
字號:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "msadodc.ocx"
Begin VB.Form 商品采購信息
Caption = "商品采購信息"
ClientHeight = 4170
ClientLeft = 60
ClientTop = 450
ClientWidth = 6330
LinkTopic = "Form4"
ScaleHeight = 4170
ScaleWidth = 6330
StartUpPosition = 3 '窗口缺省
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 120
Top = 3840
Visible = 0 'False
Width = 1215
_ExtentX = 2143
_ExtentY = 661
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 = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=超市;Initial Catalog=超市"
OLEDBString = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=超市;Initial Catalog=超市"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from 商品基本信息"
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.CommandButton Command3
Caption = "返回"
Height = 495
Left = 4320
TabIndex = 8
Top = 3000
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "采購"
Height = 495
Left = 2520
TabIndex = 7
Top = 3000
Width = 1215
End
Begin VB.TextBox Text2
Height = 375
Left = 4080
TabIndex = 6
Top = 960
Width = 1095
End
Begin VB.TextBox Text1
Height = 375
Left = 1320
TabIndex = 5
Top = 960
Width = 1095
End
Begin VB.Label Label6
Height = 495
Left = 3960
TabIndex = 13
Top = 2280
Width = 1335
End
Begin VB.Label Label5
Caption = "現有數量"
Height = 495
Left = 3000
TabIndex = 12
Top = 2280
Width = 855
End
Begin VB.Label Label4
Height = 375
Left = 4080
TabIndex = 11
Top = 1560
Width = 1095
End
Begin VB.Label Label3
Height = 375
Left = 1320
TabIndex = 10
Top = 2280
Width = 1215
End
Begin VB.Label Label2
Height = 375
Left = 1320
TabIndex = 9
Top = 1560
Width = 1095
End
Begin VB.Label Label1
Caption = "采購數量"
Height = 375
Index = 7
Left = 3000
TabIndex = 4
Top = 960
Width = 975
End
Begin VB.Label Label1
Caption = "采購單價"
Height = 375
Index = 5
Left = 3000
TabIndex = 3
Top = 1560
Width = 975
End
Begin VB.Label Label1
Caption = "采購總額"
Height = 375
Index = 4
Left = 360
TabIndex = 2
Top = 2280
Width = 975
End
Begin VB.Label Label1
Caption = "商品名"
Height = 375
Index = 1
Left = 360
TabIndex = 1
Top = 1560
Width = 975
End
Begin VB.Label Label1
Caption = "商品號"
Height = 375
Index = 0
Left = 360
TabIndex = 0
Top = 960
Width = 975
End
End
Attribute VB_Name = "商品采購信息"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Adodc1.RecordSource = "select * from 商品基本信息"
Adodc1.Refresh
While (Adodc1.Recordset.EOF = False)
If Trim(Adodc1.Recordset.Fields(0)) = Trim(Text1.Text) Then
Adodc1.Recordset.MoveNext
Else
MsgBox ("商品不存在,請輸入新商品號!")
Text1.SetFocus
Text1.Text = ""
Text2.Text = ""
Exit Sub
End If
Wend
Adodc1.RecordSource = "select * from 商品基本信息 where 商品號 = '" + Trim(Text1.Text) + "'"
Adodc1.Refresh
Label2.Caption = Trim(Adodc1.Recordset.Fields("商品名"))
Label4.Caption = Trim(Adodc1.Recordset.Fields("采購單價"))
Label3.Caption = Str(Adodc1.Recordset.Fields("采購單價")) * Trim(Text2.Text)
Label6.Caption = Str(Adodc1.Recordset.Fields("現有數量")) + Val(Text2.Text)
Adodc1.Recordset.Fields("現有數量") = Trim(Label6.Caption)
Adodc1.Recordset.Update
Adodc1.Recordset.Close
End Sub
Private Sub Command2_Click()
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -