📄 form6.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Form6
Caption = "Form6"
ClientHeight = 6780
ClientLeft = 60
ClientTop = 345
ClientWidth = 9000
LinkTopic = "Form6"
ScaleHeight = 6780
ScaleWidth = 9000
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command5
Caption = "退出"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 3120
TabIndex = 18
Top = 6000
Width = 2775
End
Begin MSAdodcLib.Adodc Adodc1
Height = 855
Left = 2280
Top = 4800
Width = 4575
_ExtentX = 8070
_ExtentY = 1508
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 2
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=kjxt.mdb;Persist Security Info=False"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=kjxt.mdb;Persist Security Info=False"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "pzb"
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 Command4
Caption = "刷新"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 7440
TabIndex = 17
Top = 6000
Width = 1335
End
Begin VB.CommandButton Command3
Caption = "保存"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 7440
TabIndex = 16
Top = 4920
Width = 1335
End
Begin VB.CommandButton Command2
Caption = "删除"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 600
TabIndex = 15
Top = 6000
Width = 1455
End
Begin VB.CommandButton Command1
Caption = "添加"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 600
TabIndex = 14
Top = 4920
Width = 1335
End
Begin VB.ComboBox Combo1
DataField = "凭证类型"
DataSource = "Adodc1"
Height = 300
ItemData = "Form6.frx":0000
Left = 4200
List = "Form6.frx":000D
TabIndex = 13
Top = 3960
Width = 2415
End
Begin VB.TextBox Text6
DataField = "日期"
DataSource = "Adodc1"
Height = 735
Left = 7080
TabIndex = 11
Top = 2520
Width = 1575
End
Begin VB.TextBox Text5
DataField = "贷方金额"
DataSource = "Adodc1"
Height = 735
Left = 7080
TabIndex = 10
Top = 1440
Width = 1575
End
Begin VB.TextBox Text4
DataField = "贷方科目"
DataSource = "Adodc1"
Height = 855
Left = 7080
TabIndex = 9
Top = 120
Width = 1575
End
Begin VB.TextBox Text3
DataField = "贷方金额"
DataSource = "Adodc1"
Height = 855
Left = 2160
TabIndex = 8
Top = 2400
Width = 1815
End
Begin VB.TextBox Text2
DataField = "贷方科目"
DataSource = "Adodc1"
Height = 855
Left = 2160
TabIndex = 7
Top = 1200
Width = 1815
End
Begin VB.TextBox Text1
DataField = "摘要"
DataSource = "Adodc1"
Height = 735
Left = 2160
TabIndex = 6
Top = 120
Width = 1815
End
Begin VB.Label Label9
Caption = "凭证类型"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1800
TabIndex = 12
Top = 3840
Width = 1575
End
Begin VB.Label Label6
Caption = "日期"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 735
Left = 4920
TabIndex = 5
Top = 2520
Width = 1815
End
Begin VB.Label Label5
Caption = "贷方金额"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 4920
TabIndex = 4
Top = 1440
Width = 1575
End
Begin VB.Label Label4
Caption = "贷方科目"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 735
Left = 5040
TabIndex = 3
Top = 240
Width = 1695
End
Begin VB.Label Label3
Caption = "借方金额"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 855
Left = 480
TabIndex = 2
Top = 2280
Width = 1335
End
Begin VB.Label Label2
Caption = "借方科目"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 735
Left = 480
TabIndex = 1
Top = 1200
Width = 1335
End
Begin VB.Label Label1
Caption = "摘要"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 480
TabIndex = 0
Top = 240
Width = 1335
End
End
Attribute VB_Name = "Form6"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Adodc1.Recordset.AddNew
Command1.Enabled = False
Command2.Enabled = False
Command3.Enabled = False
Adodc1.Enabled = False
'Combo1.ListIndex = 1
Text1.SetFocus
End Sub
Private Sub Command2_Click()
If MsgBox("真的要删除" + Text1.Text + "吗?", vbQuestion + vbYesNo, "提示") = vbYes Then
Adodc1.Recordset.Delete
Adodc1.Recordset.MoveNext
If Adodc1.BOFAction Then
Adodc1.Recordset.MoveNext
End If
If Adodc1.EOFAction Then
Adodc1.Recordset.MoveLast
End If
End If
End Sub
Private Sub Command3_Click()
If Trim(Combo1) = "" Then
MsgBox "凭证类型不能为空!", vbCritical, "提示"
Combo1 = ""
Combo1.SetFocus
ElseIf Trim(Text1.Text) = "" Then
MsgBox "摘要不能为空!", vbCritical, "提示"
Text1.Text = ""
Text1.SetFocus
ElseIf Trim(Text2.Text) = "" Then
MsgBox "借方科目不能为空!", vbCritical, "提示"
Text2.Text = ""
Text2.SetFocus
ElseIf Trim(Text3.Text) = "" Then
MsgBox "贷方科目不能为空!", vbCritical, "提示"
Text3.Text = ""
Text3.SetFocus
ElseIf Trim(Text4.Text) = "" Then
MsgBox "日期不能为空!", vbCritical, "提示"
Text4.Text = ""
Text4.SetFocus
Else
Adodc1.Recordset.Update
Command3.Enabled = True
Command2.Enabled = True
Adodc1.Enabled = True
MsgBox "加入成功!", vbCritical, "提示"
End If
End Sub
Private Sub Command4_Click()
Adodc1.Refresh
Command1.Enabled = True
Command2.Enabled = True
Command3.Enabled = True
End Sub
Private Sub Command5_Click()
MDIForm1.Show
Form6.Hide
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -