?? frminputboxfetch.frm
字號:
VERSION 5.00
Begin VB.Form frmIBF
BackColor = &H00404040&
BorderStyle = 1 'Fixed Single
Caption = "請輸入密碼!"
ClientHeight = 1980
ClientLeft = 45
ClientTop = 435
ClientWidth = 7590
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 1980
ScaleWidth = 7590
Begin VB.TextBox txt
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 270
IMEMode = 3 'DISABLE
Left = 120
PasswordChar = "*"
TabIndex = 0
Top = 1560
Width = 7335
End
Begin VB.CommandButton cmdOK
Caption = "確 定"
Default = -1 'True
Height = 345
Left = 6480
TabIndex = 1
Top = 240
Width = 975
End
Begin VB.CommandButton cmdCancel
Cancel = -1 'True
Caption = "取 消"
Height = 345
Left = 6480
TabIndex = 2
Top = 840
Width = 975
End
Begin VB.Label lbl
AutoSize = -1 'True
BackColor = &H00404040&
Caption = "請輸入密碼!"
ForeColor = &H00FFFFFF&
Height = 180
Left = 240
TabIndex = 3
Top = 240
Width = 1080
End
End
Attribute VB_Name = "frmIBF"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rst As Recordset
Public consumerID As String
Public consumerMoney As Double
Public nowDate As String
Public nowTime As String
Public balance As Double
Public DDate As String
Public passTime As Double
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdOK_Click()
Set rst = New Recordset
'''''''''''''''''''''''''''''''''''判斷密碼輸入的正確性↓
If Len(txt.Text) = 0 Then
MsgBox "密碼不能為空!"
Exit Sub
End If
'''''''''''''''''''''''''''''''''''''''''
Call LinkDB(landWay, SName, "weboy", SUName, SUPw)
con.Open
rst.Open "select * from CConsumers where id='" & consumerID & "'", con, adOpenDynamic, adLockOptimistic
'''''''''''''''''''''''''''''''''''''''''''
If txt.Text = rst!password Then '如果密碼正確
con.Execute "insert " & consumerID & " values('" & nowDate & "','get','" & consumerMoney & "','" & (balance) * (1 + (passTime * ((percentage0 / 100) / 12))) - consumerMoney & "','" & userName & "')"
con.Close
If MsgBox("取款成功,請問是否需要打印存根?", vbOKCancel, "提示") = vbOK Then '如果確認提示
frmPrintFetch.lbl(1).Caption = consumerID
frmPrintFetch.lbl(3).Caption = consumerMoney
frmPrintFetch.lbl(4).Caption = balance - consumerMoney
frmPrintFetch.lbl(5).Caption = nowTime
frmPrintFetch.lbl(6).Caption = userName
frmPrintFetch.PrintForm
Unload frmPrintFetch
End If
MsgBox "取款完成"
Unload Me
Unload frmFetch
Else
MsgBox "密碼不正確!"
Exit Sub
End If
End Sub
Private Sub Form_Load()
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -