📄 frm_kxk.frm
字号:
Index = 4
Left = 825
TabIndex = 6
Top = 828
Width = 2400
End
Begin VB.TextBox Text1
BackColor = &H00C0E0FF&
Height = 270
Index = 2
Left = 4044
TabIndex = 7
Text = "0.00"
Top = 804
Width = 885
End
Begin VB.TextBox Text1
BackColor = &H00C0E0FF&
Height = 270
Index = 3
Left = 825
MaxLength = 20
TabIndex = 2
Top = 492
Width = 2025
End
Begin VB.TextBox Text1
BackColor = &H00C0E0FF&
ForeColor = &H000000FF&
Height = 270
Index = 0
Left = 825
MaxLength = 8
TabIndex = 0
Top = 168
Width = 2400
End
Begin VB.TextBox Text1
BackColor = &H00C0E0FF&
Height = 270
Index = 1
Left = 4020
MaxLength = 4
TabIndex = 1
Top = 168
Width = 2640
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "经理密码:"
ForeColor = &H00000000&
Height = 180
Index = 12
Left = 4584
TabIndex = 44
Top = 540
Width = 900
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "范围:"
ForeColor = &H00000000&
Height = 180
Index = 11
Left = 3444
TabIndex = 43
Top = 1512
Width = 540
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "介绍人:"
ForeColor = &H00000000&
Height = 180
Index = 8
Left = 96
TabIndex = 40
Top = 1512
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "现金额:"
ForeColor = &H00000000&
Height = 180
Index = 7
Left = 5124
TabIndex = 39
Top = 1176
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "打折:"
ForeColor = &H00000000&
Height = 180
Index = 6
Left = 3432
TabIndex = 38
Top = 1188
Width = 540
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "备注:"
ForeColor = &H00000000&
Height = 180
Index = 5
Left = 252
TabIndex = 25
Top = 1200
Width = 540
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "日期:"
ForeColor = &H00000000&
Height = 180
Index = 4
Left = 252
TabIndex = 24
Top = 912
Width = 540
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "编号:"
ForeColor = &H00000000&
Height = 180
Index = 0
Left = 252
TabIndex = 23
Top = 228
Width = 540
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "原金额:"
ForeColor = &H00000000&
Height = 180
Index = 2
Left = 3408
TabIndex = 22
Top = 876
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "诊断:"
ForeColor = &H00000000&
Height = 180
Index = 3
Left = 252
TabIndex = 21
Top = 552
Width = 540
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "姓名:"
ForeColor = &H00000000&
Height = 180
Index = 1
Left = 3432
TabIndex = 20
Top = 228
Width = 540
End
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "确认密码:"
ForeColor = &H00000000&
Height = 180
Index = 10
Left = 6984
TabIndex = 42
Top = 1356
Width = 900
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "密码:"
ForeColor = &H00000000&
Height = 180
Index = 9
Left = 6996
TabIndex = 41
Top = 876
Width = 540
End
End
Attribute VB_Name = "frm_kxk"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rec As Recordset
Private Sub Check1_Click()
If Check1.Value Then
Text1(6) = 0
Text1(7) = 0
Text1(2).Enabled = False
Text1(6).Enabled = False
Text1(7).Enabled = False
Text1(5) = "经理同意"
Text4.Enabled = True
Else
Text1(6) = 10
Text1(7) = Text1(2)
Text1(2).Enabled = True
Text1(6).Enabled = True
Text1(7).Enabled = True
Text4.Enabled = False
Text1(5) = ""
End If
End Sub
Private Sub Combo2_Click()
Select Case Combo2.ListIndex
Case 0 '包一月
Check2.Visible = False
Me.Height = 2340
Case 1 '包一季度
Check2.Visible = False
Me.Height = 2340
Text1(6) = 9.5
Case 2 '包半年
Check2.Visible = False
Me.Height = 2340
Text1(6) = 9
Case 3 '包全年
Check2.Visible = True
Me.Height = 4020
Text1(6) = 8
End Select
Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2
End Sub
Private Sub Check2_Click()
If Check2.Value Then
Me.Height = 4020
Else
Me.Height = 2340
End If
Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2
End Sub
Private Sub Command1_Click(Index As Integer)
'On Error GoTo jgqerr
If Index = 0 Then
If Trim(Text1(0)) = "" Then
MsgBox "您没有输入编号", vbOKOnly + vbInformation, "提示"
Exit Sub
End If
If Check1.Value Then
Set rec = db.OpenRecordset("select * from 经理表 where 密码='" + Text4 + "'")
If rec.EOF And rec.BOF Then
MsgBox "经理密码输入错误", vbOKOnly + vbCritical, "错误"
Exit Sub
End If
End If
If Trim(Text1(1)) = "" Then
MsgBox "姓名不能为空", vbOKOnly + vbCritical, "错误"
Text1(1).SetFocus
Exit Sub
End If
If Trim(Text1(3)) = "" Then
MsgBox "诊断不能为空", vbOKOnly + vbCritical, "错误"
Command2.SetFocus
Exit Sub
End If
If IsNumeric(Text1(2)) = False Then
MsgBox "金额输入有误", vbOKOnly + vbCritical, "错误"
Text1(2).SetFocus
Exit Sub
End If
If Trim(Text1(6)) = "" Then
MsgBox "打折不能为空", vbOKOnly + vbCritical, "错误"
Text1(6).SetFocus
Exit Sub
End If
If Val(Trim(Text1(6))) < 0 Or Val(Trim(Text1(6))) > 10 Then
MsgBox "打折范围输入错误", vbOKOnly + vbCritical, "错误"
Text1(6).SetFocus
Exit Sub
End If
If Combo1.Text = "" Then
MsgBox "必须输入介绍人姓名", vbOKOnly + vbCritical, "错误"
Combo1.SetFocus
Exit Sub
End If
If Text3(0) <> Text3(1) Or Trim(Text3(0)) = "" Or Trim(Text3(1)) = "" Then
MsgBox "您输入的密码不能确定", vbOKOnly + vbCritical, "错误"
Text3(1).SetFocus
Exit Sub
End If
Select Case Combo2.ListIndex '不是包全年
Case 0 '包一月
Set rec = db.OpenRecordset("包月卡")
rec.AddNew
rec.Fields("编号") = Val(Text1(0))
rec.Fields("姓名") = Text1(1)
rec.Fields("诊断") = Text1(3)
rec.Fields("金额") = CCur(Val(Text1(7)))
rec.Fields("日期") = Date
rec.Fields("是否包全年") = IIf(Combo2.ListIndex = 3, "是", "否")
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -