?? view_upd.frm
字號:
VERSION 5.00
Begin VB.Form view_upd
BorderStyle = 3 'Fixed Dialog
Caption = "庫存值修改"
ClientHeight = 4140
ClientLeft = 2760
ClientTop = 3750
ClientWidth = 7110
Icon = "view_upd.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4140
ScaleWidth = 7110
ShowInTaskbar = 0 'False
Begin VB.TextBox txt_min
Height = 375
Left = 1320
TabIndex = 13
Top = 2040
Width = 1695
End
Begin VB.ComboBox cmb_unit
Height = 300
Left = 4440
TabIndex = 11
Top = 600
Width = 1695
End
Begin VB.TextBox txt_oprice
Height = 375
Left = 4440
TabIndex = 10
Top = 1320
Width = 1695
End
Begin VB.TextBox txt_iprice
Height = 375
Left = 1320
TabIndex = 7
Top = 1320
Width = 1695
End
Begin VB.TextBox txt_num
Height = 375
Left = 1320
TabIndex = 6
Top = 600
Width = 1695
End
Begin VB.TextBox txt_name
Height = 375
Left = 1320
TabIndex = 5
Top = 120
Width = 1695
End
Begin VB.CommandButton CancelButton
Caption = "取消"
Height = 375
Left = 4440
TabIndex = 1
Top = 3240
Width = 1215
End
Begin VB.CommandButton OKButton
Caption = "確定"
Height = 375
Left = 2040
TabIndex = 0
Top = 3240
Width = 1215
End
Begin VB.Label Label6
Caption = "庫存報警值"
Height = 255
Left = 360
TabIndex = 12
Top = 2040
Width = 975
End
Begin VB.Label Label5
Caption = "售價"
Height = 255
Left = 3240
TabIndex = 9
Top = 1320
Width = 855
End
Begin VB.Label Label4
Caption = "單位"
Height = 255
Left = 3240
TabIndex = 8
Top = 720
Width = 975
End
Begin VB.Label Label3
Caption = "進價"
Height = 255
Left = 360
TabIndex = 4
Top = 1320
Width = 975
End
Begin VB.Label Label2
Caption = "庫存數"
Height = 255
Left = 360
TabIndex = 3
Top = 720
Width = 975
End
Begin VB.Label Label1
Caption = "貨物名稱"
Height = 255
Left = 360
TabIndex = 2
Top = 240
Width = 975
End
End
Attribute VB_Name = "view_upd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Sql As String
Dim RS As ADODB.Recordset
Private Sub CancelButton_Click()
Unload Me
End Sub
Private Sub Form_Load()
Sql = "select unit from [unit]"
Set RS = dbSelect(Sql)
While Not RS.EOF
cmb_unit.AddItem RS.Fields(0)
RS.MoveNext
Wend
Set RS = Nothing
txt_name.Enabled = False
End Sub
Private Sub OKButton_Click()
'修改貨物庫存信息
If Me.txt_num <> "" And Me.cmb_unit <> "" And Me.txt_iprice <> "" And Me.txt_oprice <> "" And Me.txt_min <> "" Then
Sql = "update [庫存] set 庫存='" & Val(Trim(Me.txt_num))
Sql = Sql & "',單位='" & Me.cmb_unit
Sql = Sql & "',進價='" & Val(Trim(Me.txt_iprice))
Sql = Sql & "',售價='" & Val(Trim(Me.txt_oprice))
Sql = Sql & "',報警值='" & Val(Trim(Me.txt_min)) & "'"
Sql = Sql & "where 貨物名稱='" & txt_name.Text & "'"
dbOperate Sql
Unload Me
Else
MsgBox "請將信息填寫完整!"
End If
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -