📄 frmshk.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form frmshk
BorderStyle = 3 'Fixed Dialog
Caption = "设置收款人"
ClientHeight = 3315
ClientLeft = 45
ClientTop = 330
ClientWidth = 5775
Icon = "frmshk.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3315
ScaleWidth = 5775
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 120
Top = 2760
Visible = 0 'False
Width = 1200
_ExtentX = 2117
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
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=data.mdb;Persist Security Info=False"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=data.mdb;Persist Security Info=False"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from 收款人"
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.Frame Frame2
Height = 532
Left = 882
TabIndex = 3
Top = 2640
Width = 4010
Begin VB.CommandButton Command4
Caption = "退出"
Height = 375
Left = 3000
TabIndex = 7
Top = 120
Width = 975
End
Begin VB.CommandButton Command3
Caption = "默认"
Height = 375
Left = 2012
TabIndex = 6
Top = 120
Width = 975
End
Begin VB.CommandButton Command2
Caption = "删除"
Height = 375
Left = 1026
TabIndex = 5
Top = 120
Width = 975
End
Begin VB.CommandButton Command1
Caption = "添加"
Height = 375
Left = 40
TabIndex = 4
Top = 120
Width = 975
End
End
Begin VB.TextBox Text1
Height = 270
Left = 1320
TabIndex = 1
Top = 320
Width = 3015
End
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "frmshk.frx":000C
Height = 1695
Left = 0
TabIndex = 2
Top = 840
Width = 5775
_ExtentX = 10186
_ExtentY = 2990
_Version = 393216
HeadLines = 1
RowHeight = 15
FormatLocked = -1 'True
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 2
BeginProperty Column00
DataField = "收款人"
Caption = "收款人"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = "是否默认"
Caption = "是否默认"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
ColumnWidth = 3915.213
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
Begin VB.Label Label1
Caption = "收款人"
Height = 255
Left = 600
TabIndex = 0
Top = 360
Width = 615
End
End
Attribute VB_Name = "frmshk"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Sub Command1_Click()
If Text1.Text = "" Then
MsgBox "收款人不得为空值!", vbOKOnly Or vbInformation, "系统信息"
Else
Adodc1.Recordset.AddNew
Adodc1.Recordset.Fields(1).Value = Text1.Text
Adodc1.Recordset.Fields(2).Value = "否"
Adodc1.Recordset.Update
Text1.Text = ""
Adodc1.Refresh
Adodc1.Recordset.MoveLast
End If
End Sub
Private Sub Command2_Click()
Dim num As Integer
num = Adodc1.Recordset.RecordCount
If num > 0 Then
X = MsgBox("确实要删除选定记录吗?", vbOKCancel Or vbQuestion, "系统信息")
If X = vbOK Then
Adodc1.Recordset.Delete
Else
Exit Sub
End If
ElseIf num = 0 Then
MsgBox "没有要删除的记当录", vbOKOnly Or vbInformation, "系统信息"
End If
End Sub
Private Sub Command3_Click()
If Adodc1.Recordset.RecordCount = 0 Then
MsgBox "记录为空", vbOKOnly Or vbInformation, "系统信息"
Else
shuqian = Adodc1.Recordset.Bookmark
Adodc1.Recordset.MoveFirst
num = Adodc1.Recordset.RecordCount
For i = 1 To num
Adodc1.Recordset.Fields(2).Value = "否"
Adodc1.Recordset.MoveNext
Next i
Adodc1.Recordset.Bookmark = shuqian
Adodc1.Recordset.Fields(2).Value = "默认"
End If
End Sub
Private Sub Command4_Click()
Unload Me
End Sub
Private Sub Form_Activate()
Screen.MousePointer = 0
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Me.Command1_Click
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -