VB电表管理信息系统 第15页
rec.Open "select * from 记住密码", gCnn, 3, 3
If rec("标记") = "0" Or rec("标记") = "1" Then
Check1.Value = rec("标记")
End If
rec.Close
Set rec = New ADODB.Recordset
rec.Open "select * from 记住密码", gCnn, 3, 3
If rec("标记") = 1 Then
Combo2.Text = rec("姓名")
Combo1.Text = rec("权限")
Text2.Text = rec("密码")
End If
rec.Close
Command1.SetFocus
End Sub
Private Sub Form_Load()
gCnn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:database password= " & DbPassword & " ;Data Source= " & _
App.Path & "\data\dbdb.mdb;Persist Security Info=False"
gCnn.CursorLocation = adUseClient
gCnn.Open
Set rec = New ADODB.Recordset
rec.Open "select distinct 姓名 from 密码表", gCnn, 3, 3
With Combo2
Do Until rec.EOF
.AddItem rec("姓名")
rec.MoveNext
Loop
End With
rec.Close
Set rec = Nothing
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
Cancel = True
Select Case MsgBox("此操作将退出本系统,继续吗?", vbYesNo, "警告")
Case vbYes
Cancel = False
End
Case Else
Cancel = True
End Select
End Sub
2.主界面设计:
主界面代码设计:
Private Sub alllm_Click()
frmList.qfFlg = False
frmList.Show
End Sub
Private Sub backup_Click()
frmbeifen.Show
End Sub
Private Sub benrixiaojie_Click()
frmCount.Show
End Sub
Private Sub Command1_Click()
frameFee.Visible = False
End Sub
Private Sub cmdQuery_Click()
Dim rst As New ADODB.Recordset
rst.Open " select * from panelinfo where holder='" & Me.txtUser & "' and delflag<>true ", gCnn, adOpenStatic, adLockBatchOptimistic
If rst.RecordCount <> 0 Then
dcvalue.Text = rst.Fields(2)
txtUserName(0) = rst.Fields(1)
txtUserName(1) = rst.Fields!nowecount
txtUserName(2) = rst.Fields!cendcode
dtpwdate.Value = rst.Fields(4)
txtUserName(3) = Format(rst.Fields!lMoney, "###0.00")
txtUserName(4) = Format(rst.Fields!bmoney, "###0.00")
txtUserName(6) = Format(rst.Fields!lsFee, "###0.00")
'txtUserName(5) = txtUserName(1) * rst.Fields!lMoney * (rst.Fields!lightScale / 100) + txtUserName(1) * txtUserName(4) * (1 - rst.Fields!lightScale / 100)
txtUserName(5) = Format(txtUserName(1) * rst.Fields!lMoney * (rst.Fields!lightScale / 100) + rst.Fields!nowecount * rst.Fields!bmoney * (1 - rst.Fields!lightScale / 100), "###0.00")
txtUserName(8) = rst.Fields(9)
txtUserName(7) = Format(Val(txtUserName(5)) + Val(txtUserName(6)), "####0.00")
dcNum.Text = rst.Fields(1)
<< 上一页 [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] 下一页
VB电表管理信息系统 第15页下载如图片无法显示或论文不完整,请联系qq752018766