?? form34.frm
字號:
VERSION 5.00
Begin VB.Form Form34
BorderStyle = 3 'Fixed Dialog
Caption = "Form34"
ClientHeight = 6630
ClientLeft = 45
ClientTop = 330
ClientWidth = 6405
LinkTopic = "Form34"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 6630
ScaleWidth = 6405
ShowInTaskbar = 0 'False
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text9
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 440
Left = 2640
TabIndex = 8
Top = 5520
Width = 1770
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 = 440
Left = 2640
TabIndex = 3
Top = 2520
Width = 1770
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 = 440
Left = 2640
TabIndex = 5
Top = 3720
Width = 1770
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 = 495
Left = 2280
TabIndex = 9
Top = 6000
Width = 1575
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 = 440
Left = 2640
TabIndex = 4
Top = 3120
Width = 1770
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 = 440
Left = 2640
TabIndex = 2
Top = 1920
Width = 1770
End
Begin VB.TextBox Text2
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 440
Left = 2640
TabIndex = 1
Top = 1320
Width = 1770
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 = 440
Left = 2640
TabIndex = 0
Top = 720
Width = 1770
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 = 440
Left = 2640
TabIndex = 6
Top = 4320
Width = 1770
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 = 440
Left = 2640
TabIndex = 7
Top = 4920
Width = 1770
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 = 1440
TabIndex = 19
Top = 5640
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 = 1440
TabIndex = 18
Top = 4440
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 = 1440
TabIndex = 17
Top = 3840
Width = 1200
End
Begin VB.Label Label7
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 = 1800
TabIndex = 16
Top = 120
Width = 2520
End
Begin VB.Label Label6
Caption = "帳單號:"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1680
TabIndex = 15
Top = 3240
Width = 975
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 = 1680
TabIndex = 14
Top = 2640
Width = 960
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 = 1680
TabIndex = 13
Top = 2040
Width = 960
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 = 1680
TabIndex = 12
Top = 1440
Width = 960
End
Begin VB.Label Label1
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 = 1680
TabIndex = 11
Top = 840
Width = 960
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 = 1440
TabIndex = 10
Top = 5040
Width = 1200
End
End
Attribute VB_Name = "Form34"
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
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 金額= " & Text6.Text & "," & " 欠款金額 =" & Text7.Text & "," & "還款金額= " & _
Text8.Text & "," & "少收金額 =" & Text9.Text & " where 編號= " & g_current_number
With cmd1
.ActiveConnection = cnn1
.CommandText = SQL
.CommandType = adCmdText
.Execute
End With
cnn1.Close
Set cnn1 = Nothing
MsgBox ("修改成功!")
Unload Form34
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 編號=" & g_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)
End Sub
Private Sub Form_Unload(Cancel As Integer)
Form28.Show
End Sub
Private Sub Text1_GotFocus()
Text6.SetFocus
End Sub
Private Sub Text2_GotFocus()
Text6.SetFocus
End Sub
Private Sub Text3_GotFocus()
Text6.SetFocus
End Sub
Private Sub Text4_GotFocus()
Text6.SetFocus
End Sub
Private Sub Text5_GotFocus()
Text6.SetFocus
End Sub
Private Sub Text6_LostFocus()
Text9.Text = Round(Text6.Text - Int(Text6.Text), 2)
End Sub
Private Sub Text7_lostFocus()
If Text7.Text < Text8.Text Then
MsgBox ("欠款金額不能小于還款金額!")
Text7.SetFocus
End If
End Sub
Private Sub Text8_GotFocus()
Text9.SetFocus
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -