📄 客户管理.frm
字号:
End
Begin VB.Label Label10
BackStyle = 0 'Transparent
Caption = "喜好:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 26
Top = 1200
Width = 855
End
Begin VB.Label Label9
BackStyle = 0 'Transparent
Caption = "通信地址:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 7320
TabIndex = 25
Top = 765
Width = 1515
End
Begin VB.Label Label8
BackStyle = 0 'Transparent
Caption = "E-mail:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 4905
TabIndex = 24
Top = 750
Width = 1530
End
Begin VB.Label Label7
BackStyle = 0 'Transparent
Caption = "手机:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 3030
TabIndex = 23
Top = 765
Width = 735
End
Begin VB.Label Label6
BackStyle = 0 'Transparent
Caption = "身份证:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 22
Top = 750
Width = 1290
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "生日:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 7020
TabIndex = 21
Top = 330
Width = 765
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "性别:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 5460
TabIndex = 20
Top = 330
Width = 825
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "姓名:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 3045
TabIndex = 19
Top = 330
Width = 825
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "卡号:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 150
TabIndex = 18
Top = 345
Width = 735
End
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "客户管理"
BeginProperty Font
Name = "隶书"
Size = 42
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FF00&
Height = 855
Left = 4028
TabIndex = 0
Top = 360
Width = 3375
End
End
Attribute VB_Name = "客户管理"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Data1.Recordset.Delete
Data1.Recordset.MoveNext
Data1.Refresh
End Sub
Private Sub Command1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyAscii = 13 Then Command1_Click
End Sub
Private Sub Command2_Click()
s = InputBox("请在下面的输入栏中输入卡号或姓名:", "查找客户", 999999)
With Data1.Recordset
strmark = .Bookmark
If s > 0 And s < 1000000 Then
.FindFirst "卡号=" & s
Else
.FindFirst "姓名=" & "'" & s & "'"
End If
If .NoMatch = True Then
Data1.Recordset.Bookmark = strmark
MsgBox "没有找到您要的客户", vbInformation
End If
End With
End Sub
Private Sub Command2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then Command2_Click
End Sub
Private Sub Data1_Error(DataErr As Integer, Response As Integer)
On Error GoTo mark
Data1.Caption = "总共有" & Data1.Recordset.RecordCount & "个用户" & "。当前是第" & Data1.Recordset.AbsolutePosition + 1 & "个用户"
Exit Sub
mark:
MsgBox "此会员已存在,请另取一卡号", vbCritical
Text1.SetFocus
SendKeys "{home}+{end}"
End Sub
Private Sub Data1_Reposition()
Data1.Caption = "总共有" & Data1.Recordset.RecordCount & "个用户" & "。当前是第" & Data1.Recordset.AbsolutePosition + 1 & "个用户"
End Sub
Private Sub Form_Activate()
If Data1.Recordset.RecordCount = 0 Then Exit Sub
Data1.Recordset.MoveLast
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 112 Then
帮助对话框.Show 1
Else
If KeyCode = vbKeyEscape Then
Unload Me
End If
End If
End Sub
Private Sub Form_Load()
Data1.DatabaseName = App.Path & "\酒吧管理数据库.mdb"
End Sub
Private Sub new__Click()
Data1.Recordset.AddNew
Text1.SetFocus
SendKeys "{home}+{end}"
End Sub
Private Sub new__KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then new__Click
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyUp Then Text1.Text = Val(Text1.Text) + 1
If KeyCode = vbKeyDown Then Text1.Text = Val(Text1.Text) - 1
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
SendKeys "{home}+{end}"
ElseIf (KeyAscii < 48 Or KeyAscii > 57) And KeyAscii <> 8 Then
MsgBox "卡号请输入数字", vbCritical
KeyAscii = 0
End If
End Sub
Private Sub Text10_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyPageUp Or KeyCode = vbKeyUp Then
Text10.Text = "男"
ElseIf KeyCode = vbKeyPageDown Or KeyCode = vbKeyDown Then
Text10.Text = "女"
End If
End Sub
Private Sub Text10_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text3.SetFocus
SendKeys "{home}+{end}"
End If
End Sub
Private Sub Text10_LostFocus()
If Not (Text10.Text = "男" Or Text10.Text = "女") Then
MsgBox "性别请输入男或女", vbCritical
Text10.Text = ""
Text10.SetFocus
SendKeys "{home}+{end}"
End If
End Sub
Private Sub Text11_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text12.SetFocus
SendKeys "{home}+{end}"
End If
End Sub
Private Sub Text12_keypress(KeyAscii As Integer)
If KeyAscii = 13 And Text12.Text <> "" Then
Text13.SetFocus
SendKeys "{home}+{end}"
End If
End Sub
Private Sub Text13_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
new_.SetFocus
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Text2.Text <> "" Then
Text10.SetFocus
SendKeys "{home}+{end}"
End If
End Sub
Private Sub Text2_LostFocus()
If Text2.Text = "" Then
MsgBox "姓名不能为空", vbCritical
Text2.SetFocus
SendKeys "{home}+{end}"
End If
End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text4.SetFocus
SendKeys "{home}+{end}"
End If
End Sub
Private Sub Text4_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text5.SetFocus
SendKeys "{home}+{end}"
ElseIf (KeyAscii < 48 Or KeyAscii > 57) And KeyAscii <> 8 Then
MsgBox "请输入数字", vbCritical
KeyAscii = 0
End If
End Sub
Private Sub Text5_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text6.SetFocus
SendKeys "{home}+{end}"
ElseIf (KeyAscii < 48 Or KeyAscii > 57) And KeyAscii <> 8 Then
MsgBox "请输入数字", vbCritical
KeyAscii = 0
End If
End Sub
Private Sub Text6_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text7.SetFocus
SendKeys "{home}+{end}"
End If
End Sub
Private Sub Text7_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text8.SetFocus
SendKeys "{home}+{end}"
End If
End Sub
Private Sub Text8_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text9.SetFocus
SendKeys "{home}+{end}"
End If
End Sub
Private Sub Text9_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text11.SetFocus
SendKeys "{home}+{end}"
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -