📄 挂失、解挂.frm
字号:
Exit Sub
End If
If Option1.Value = True Then
Call openconn
rs.Open "select * from card_xx053_06 where c_No='" & Trim(Text1.Text) & "'and id='" & Trim(Text2.Text) & "'", conn, adOpenDynamic, adLockOptimistic
If rs.BOF And rs.EOF Then
MsgBox "卡号和证件号不匹配", vbRetryCancel + vbExclamation, "错误提示"
Unload Me
Form17.Show
Else
If (rs!lost) = False Then
MsgBox "该卡已解挂!"
rs.Close
Unload Me
Form3.Show
Else
rs.Fields(4) = 0
rs.Update
rs.Close
MsgBox "卡解挂成功!"
Unload Me
Form3.Show
End If
End If
Else
Call openconn
rs.Open "select * from account_xx053_06 where b_No='" & Trim(Text1.Text) & "'and id='" & Trim(Text2.Text) & "'", conn, adOpenDynamic, adLockOptimistic
If rs.BOF And rs.EOF Then
MsgBox "输入不正确!请从新输入"
Unload Me
Form17.Show
Else
If (rs!lost) = False Then
MsgBox "该帐户已解挂!"
rs.Close
Unload Me
Form3.Show
Else
rs.Fields(3) = 0
rs.Update
rs.Close
MsgBox "帐户解挂成功!"
Unload Me
Form3.Show
End If
End If
End If
ElseIf Not IsNumeric(Text3.Text) Then
MsgBox "密码为数字!", vbRetryCancel + vbExclamation, "错误提示"
Exit Sub
ElseIf Len(Text3.Text) <> 6 Then
MsgBox "密码为6位!", vbRetryCancel + vbExclamation, "错误提示"
Text3.SetFocus
Exit Sub
ElseIf Trim(Text3.Text) <> Trim(Text4.Text) Then
MsgBox "密码输入不一致!", vbRetryCancel + vbExclamation, "错误提示"
Text3.SetFocus
Exit Sub
ElseIf Option1.Value = True Then
Call openconn
rs.Open "select * from card_xx053_06 where c_No='" & Trim(Text1.Text) & "'and c_key='" & Trim(Text3.Text) & "'", conn, adOpenDynamic, adLockOptimistic
If rs.BOF And rs.EOF Then
MsgBox "卡号和密码不匹配", vbRetryCancel + vbExclamation, "错误提示"
Unload Me
Form17.Show
Else
If (rs!lost) = False Then
MsgBox "该卡已解挂!"
rs.Close
Unload Me
Form3.Show
Else
rs.Fields(4) = 0
rs.Update
rs.Close
MsgBox "卡解挂成功!"
Unload Me
Form3.Show
End If
End If
Else
Call openconn
rs.Open "select * from account_xx053_06 where b_No='" & Trim(Text1.Text) & "'and b_key='" & Trim(Text3.Text) & "'", conn, adOpenDynamic, adLockOptimistic
If rs.BOF And rs.EOF Then
MsgBox "输入不正确!请从新输入"
Unload Me
Form17.Show
Else
If (rs!lost) = False Then
MsgBox "该帐户已解挂!"
rs.Close
Unload Me
Form3.Show
Else
rs.Fields(3) = 0
rs.Update
rs.Close
MsgBox "帐户解挂成功!"
Unload Me
Form3.Show
End If
End If
End If
End Sub
Private Sub Command3_Click()
Unload Me
Form3.Show
End Sub
Private Sub Command6_Click()
If Check1.Value <> 1 And Check2.Value <> 1 Then
MsgBox "请选择方式!"
Exit Sub
ElseIf Option1.Value = False And Option2.Value = False Then
MsgBox "请选择物品!"
Exit Sub
ElseIf Not IsNumeric(Text1.Text) Then
MsgBox "卡和帐户必需为位数字!", vbRetryCancel + vbExclamation, "错误提示"
Text1.SetFocus
Exit Sub
ElseIf Len(Text1.Text) <> 18 Then
MsgBox "卡和帐户长度必需为18位!", vbRetryCancel + vbExclamation, "错误提示"
Text1.SetFocus
Exit Sub
ElseIf Check1.Value = 1 Then
If Not IsNumeric(Text2.Text) Then
MsgBox "身份证必须为数字"
Text2.SetFocus
Exit Sub
End If
If Len(Text2.Text) > 20 Then
MsgBox "身份证号必须小于20位"
Text2.SetFocus
Exit Sub
End If
If Option1.Value = True Then
Call openconn
rs.Open "select * from card_xx053_06 where c_No='" & Trim(Text1.Text) & "'and id='" & Trim(Text2.Text) & "'", conn, adOpenDynamic, adLockOptimistic
If rs.BOF And rs.EOF Then
MsgBox "卡号和证件号不匹配", vbRetryCancel + vbExclamation, "错误提示"
Unload Me
Form17.Show
Else
If (rs!lost) = True Then
MsgBox "该卡已挂失!"
rs.Close
Unload Me
Form3.Show
Else
rs.Fields(4) = 1
rs.Update
MsgBox "卡挂失成功!"
rs.Close
Unload Me
Form3.Show
End If
End If
Else
Call openconn
rs.Open "select * from account_xx053_06 where b_No='" & Trim(Text1.Text) & "'and id='" & Trim(Text2.Text) & "'", conn, adOpenDynamic, adLockOptimistic
If rs.BOF And rs.EOF Then
MsgBox "输入不正确!请从新输入"
Unload Me
Form17.Show
Else
If (rs!lost) = True Then
MsgBox "该帐户已挂失!"
rs.Close
Unload Me
Form3.Show
Else
rs.Fields(3) = 1
rs.Update
rs.Close
MsgBox "帐户挂失成功!"
Unload Me
Form3.Show
End If
End If
End If
ElseIf Not IsNumeric(Text3.Text) Then
MsgBox "密码为数字!", vbRetryCancel + vbExclamation, "错误提示"
Exit Sub
ElseIf Len(Text3.Text) <> 6 Then
MsgBox "密码为6位!", vbRetryCancel + vbExclamation, "错误提示"
Text3.SetFocus
Exit Sub
ElseIf Trim(Text3.Text) <> Trim(Text4.Text) Then
MsgBox "密码输入不一致!", vbRetryCancel + vbExclamation, "错误提示"
Text3.SetFocus
Exit Sub
ElseIf Option1.Value = True Then
Call openconn
rs.Open "select * from card_xx053_06 where c_No='" & Trim(Text1.Text) & "'and c_key='" & Trim(Text3.Text) & "'", conn, adOpenDynamic, adLockOptimistic
If rs.BOF And rs.EOF Then
MsgBox "卡号和密码不匹配", vbRetryCancel + vbExclamation, "错误提示"
Unload Me
Form17.Show
Else
If (rs!lost) = True Then
MsgBox "该卡已挂失!"
rs.Close
Unload Me
Form3.Show
Else
rs.Fields(4) = 1
rs.Update
rs.Close
MsgBox "卡挂失成功!"
Unload Me
Form3.Show
End If
End If
Else
Call openconn
rs.Open "select * from account_xx053_06 where b_No='" & Trim(Text1.Text) & "'and b_key='" & Trim(Text3.Text) & "'", conn, adOpenDynamic, adLockOptimistic
If rs.BOF And rs.EOF Then
MsgBox "输入不正确!请从新输入"
Unload Me
Form17.Show
Else
If (rs!lost) = True Then
MsgBox "该帐户已挂失!"
rs.Close
Unload Me
Form3.Show
Else
rs.Fields(3) = 1
rs.Update
rs.Close
MsgBox "帐户挂失成功!"
Unload Me
Form3.Show
End If
End If
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -