📄 form3.frm
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form frmDeposit
Caption = "Deposit form"
ClientHeight = 6840
ClientLeft = 60
ClientTop = 450
ClientWidth = 9915
LinkTopic = "Form3"
ScaleHeight = 6840
ScaleWidth = 9915
StartUpPosition = 3 'Windows Default
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = "D:\new project\bankdb.mdb"
DefaultCursorType= 0 'DefaultCursor
DefaultType = 2 'UseODBC
Exclusive = 0 'False
Height = 345
Left = 8280
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "Deposit table"
Top = 480
Width = 1140
End
Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1
Bindings = "Form3.frx":0000
Height = 3735
Left = 120
TabIndex = 8
Top = 2880
Width = 8175
_ExtentX = 14420
_ExtentY = 6588
_Version = 393216
Appearance = 0
End
Begin VB.Frame Frame1
Caption = "Deposit"
Height = 2535
Left = 120
TabIndex = 0
Top = 240
Width = 9615
Begin VB.CommandButton Command3
Caption = "<<Previous"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 8400
TabIndex = 18
Top = 1920
Width = 1095
End
Begin VB.CommandButton Command2
Caption = ">>Next"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 7200
TabIndex = 17
Top = 1920
Width = 975
End
Begin VB.CommandButton Command1
Caption = "Refresh"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 5640
TabIndex = 16
Top = 1920
Width = 1215
End
Begin VB.ComboBox Combo1
Appearance = 0 'Flat
DataField = "Mode"
DataSource = "Data1"
Height = 315
ItemData = "Form3.frx":0014
Left = 960
List = "Form3.frx":001E
TabIndex = 15
Text = "select..."
Top = 1320
Width = 1575
End
Begin VB.TextBox txtcustnam
Appearance = 0 'Flat
DataField = "CustomerName"
DataSource = "Data1"
Height = 285
Index = 1
Left = 1200
TabIndex = 13
Top = 480
Width = 1815
End
Begin VB.CommandButton cmdadd
Caption = "&Add"
BeginProperty Font
Name = "Arial Narrow"
Size = 11.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Index = 0
Left = 120
TabIndex = 12
Top = 1920
Width = 1215
End
Begin VB.CommandButton cmdsave
Caption = "&save"
BeginProperty Font
Name = "Arial"
Size = 11.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Index = 1
Left = 1440
TabIndex = 11
Top = 1920
Width = 1215
End
Begin VB.CommandButton cmddelete
Caption = "&delete"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Index = 2
Left = 2760
TabIndex = 10
Top = 1920
Width = 1215
End
Begin VB.CommandButton cmdedit
Caption = "&Edit"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Index = 0
Left = 4200
TabIndex = 9
Top = 1920
Width = 1215
End
Begin VB.TextBox txtAmountDeposited
Appearance = 0 'Flat
DataField = "AmountDeposited"
DataSource = "Data1"
Height = 285
Left = 4440
TabIndex = 3
Top = 960
Width = 1575
End
Begin VB.TextBox txtAccountNam
Appearance = 0 'Flat
DataField = "AccountNumber"
DataSource = "Data1"
Height = 285
Index = 0
Left = 1200
TabIndex = 2
Top = 960
Width = 1815
End
Begin MSComCtl2.DTPicker txtDated
DataField = "Dated"
DataSource = "Data1"
Height = 375
Left = 3960
TabIndex = 1
Top = 360
Width = 1815
_ExtentX = 3201
_ExtentY = 661
_Version = 393216
Format = 16515073
CurrentDate = 38293
End
Begin VB.Label Label1
Caption = "mode"
Height = 375
Left = 120
TabIndex = 14
Top = 1320
Width = 1215
End
Begin VB.Label lblFieldLabel
Alignment = 1 'Right Justify
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Dated:"
Height = 195
Index = 7
Left = 3240
TabIndex = 7
Top = 480
Width = 480
End
Begin VB.Label lblFieldLabel
Alignment = 1 'Right Justify
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "AmountDeposited:"
Height = 195
Index = 4
Left = 3240
TabIndex = 6
Top = 960
Width = 1305
End
Begin VB.Label lblFieldLabel
Alignment = 1 'Right Justify
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Accouname"
Height = 195
Index = 2
Left = 90
TabIndex = 5
Top = 960
Width = 855
End
Begin VB.Label lblFieldLabel
Alignment = 1 'Right Justify
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Customername:"
Height = 195
Index = 1
Left = 30
TabIndex = 4
Top = 480
Width = 1095
End
End
End
Attribute VB_Name = "frmDeposit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdadd_Click(Index As Integer)
On Error Resume Next
Data1.Recordset.AddNew
End Sub
Private Sub cmddelete_Click(Index As Integer)
On Error Resume Next
If Data1.Recordset.EOF Then
Data1.Recordset.MoveLast
MsgBox "last record"
Else
If MsgBox("are you sure to delete this number", vbQuestion + vbOKCancel, "confirm delete....") = vbOK Then
Data1.Recordset.Delete
MsgBox ("seccesfuly Deleted")
Data1.Refresh
End If
End If
End Sub
Private Sub cmdedit_Click(Index As Integer)
On Error Resume Next
Data1.UpdateRecord
Data1.Recordset.Bookmark = Data1.Recordset.LastModified
MsgBox ("seccessfuly edited")
Data1.Refresh
End Sub
Private Sub cmdsave_Click(Index As Integer)
On Error Resume Next
If MsgBox("are you sure to save this record", vbQuestion + vbYesNo, "Saving") = vbYes Then
Data1.Recordset.Update
MsgBox "Saving compeleted"
Data1.Refresh
End If
End Sub
Private Sub Command1_Click()
Data1.Refresh
End Sub
Private Sub Command2_Click()
Data1.Recordset.MoveNext
End Sub
Private Sub Command3_Click()
On Error Resume Next
Data1.Recordset.MovePrevious
End Sub
Private Sub txtAccountNam_KeyPress(Index As Integer, KeyAscii As Integer)
If Not Numeric = False Then
MsgBox ("enter text only")
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -