📄 form22.frm
字号:
VERSION 5.00
Begin VB.Form Form22
BorderStyle = 1 'Fixed Single
Caption = "Form22"
ClientHeight = 7905
ClientLeft = 45
ClientTop = 435
ClientWidth = 9315
LinkTopic = "Form22"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 7905
ScaleWidth = 9315
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text2
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 420
Left = 4440
TabIndex = 1
Text = "Text2"
Top = 1680
Width = 1615
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 420
Left = 4440
TabIndex = 0
Text = "Text1"
Top = 1080
Width = 1615
End
Begin VB.CommandButton Command1
Caption = "确认修改"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 420
Left = 3720
TabIndex = 10
Top = 7200
Width = 1695
End
Begin VB.TextBox Text10
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 420
Left = 4440
TabIndex = 9
Text = "0"
Top = 6480
Width = 1615
End
Begin VB.TextBox Text9
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 420
Left = 4440
TabIndex = 8
Text = "0"
Top = 5880
Width = 1615
End
Begin VB.TextBox Text8
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 420
Left = 4440
TabIndex = 7
Text = "0"
Top = 5280
Width = 1615
End
Begin VB.TextBox Text7
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 420
Left = 4440
TabIndex = 6
Text = "0"
Top = 4680
Width = 1615
End
Begin VB.TextBox Text6
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 420
Left = 4440
TabIndex = 5
Text = "0"
Top = 4080
Width = 1615
End
Begin VB.TextBox Text5
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 420
Left = 4440
TabIndex = 4
Top = 3480
Width = 1615
End
Begin VB.TextBox Text4
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 420
Left = 4440
TabIndex = 3
Top = 2880
Width = 1615
End
Begin VB.TextBox Text3
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 420
Left = 4440
TabIndex = 2
Text = "Text3"
Top = 2280
Width = 1615
End
Begin VB.Label Label11
AutoSize = -1 'True
Caption = "卸 车 费:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 3120
TabIndex = 21
Top = 6600
Width = 1200
End
Begin VB.Label Label10
AutoSize = -1 'True
Caption = "购入金额:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 3120
TabIndex = 20
Top = 5400
Width = 1200
End
Begin VB.Label Label9
AutoSize = -1 'True
Caption = "运 费:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 3120
TabIndex = 19
Top = 6000
Width = 1200
End
Begin VB.Label Label8
AutoSize = -1 'True
Caption = "购入单价:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 3120
TabIndex = 18
Top = 4800
Width = 1200
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "购入斤数:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 3120
TabIndex = 17
Top = 4200
Width = 1200
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "单 号:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 3120
TabIndex = 16
Top = 3600
Width = 1200
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "日 期:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 3120
TabIndex = 15
Top = 3000
Width = 1200
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "月 份:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 3120
TabIndex = 14
Top = 2400
Width = 1200
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "年 份:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 3120
TabIndex = 13
Top = 1800
Width = 1200
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "品 种:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 3120
TabIndex = 12
Top = 1200
Width = 1200
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "产品寄售修改画面"
BeginProperty Font
Name = "宋体"
Size = 15.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 3240
TabIndex = 11
Top = 360
Width = 2520
End
End
Attribute VB_Name = "Form22"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim cnn1 As ADODB.Connection
Dim cmd1 As ADODB.Command
Dim rs1 As ADODB.Recordset
Set cnn1 = New ADODB.Connection
cnn1.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\Documents and Settings\jujumao\My Documents\粤丰饲料\粤丰饲料经营情况.mdb;"
Set cmd1 = New ADODB.Command
SQL = "update 品种寄售表 set 日期 =" & Text4.Text & ",单号='" & Text5.Text & "'" & _
",购入斤数=" & Text6.Text & ",购入单价=" & Text7.Text & ",购入金额=" & Text8.Text & _
",运费=" & Text9.Text & ",卸车费 =" & Text10.Text & " where 编号 =" & m_current_number
With cmd1
.ActiveConnection = cnn1
.CommandText = SQL
.CommandType = adCmdText
.Execute
End With
cnn1.Close
Set cnn1 = Nothing
MsgBox ("数据更新成功!")
Unload Form22
End Sub
Private Sub Form_Load()
Dim cnn1 As ADODB.Connection
Dim cmd1 As ADODB.Command
Dim rs1 As ADODB.Recordset
Set cnn1 = New ADODB.Connection
cnn1.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\Documents and Settings\jujumao\My Documents\粤丰饲料\粤丰饲料经营情况.mdb;"
Set cmd1 = New ADODB.Command
SQL = "SELECT * from 品种寄售表 where 编号 =" & m_current_number
With cmd1
.ActiveConnection = cnn1
.CommandText = SQL
.CommandType = adCmdText
End With
Set rs1 = cmd1.Execute
rs1.MoveFirst
Text1.Text = rs1.Fields(1)
Text2.Text = rs1.Fields(2)
Text3.Text = rs1.Fields(3)
Text4.Text = rs1.Fields(4)
Text5.Text = rs1.Fields(5)
Text6.Text = rs1.Fields(6)
Text7.Text = rs1.Fields(7)
Text8.Text = rs1.Fields(8)
Text9.Text = rs1.Fields(9)
Text10.Text = rs1.Fields(10)
cnn1.Close
Set cnn1 = Nothing
End Sub
Private Sub Form_Unload(Cancel As Integer)
Form23.Show
End Sub
Private Sub Text1_GotFocus()
Text4.SetFocus
End Sub
Private Sub Text2_GotFocus()
Text4.SetFocus
End Sub
Private Sub Text3_GotFocus()
Text4.SetFocus
End Sub
Private Sub Text8_GotFocus()
Text8.Text = Text6.Text * Text7.Text
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -