【正文】
f Right(, 1) \ Then = + \ Else = End If = End Sub Private Sub Drive1_Change() If = a: Then MsgBox 不能從 A 盤導入 Exit Sub End If = End Sub Private Sub File1_Click() = + = True End Sub Private Sub Form_Activate() = False 39。Jet OLEDB:database password= amp。 。 _ amp。Persist Security Info=False = adUseClient End If End Sub 7. 數據刪除界面設計 : 數據刪除代碼設計 : Private Sub cmdAsure_Click() If MsgBox( 你確定要刪除該數據嗎 ? , vbInformation + vbYesNo) vbYes Then Exit Sub End If If Trim() Then Dim n As New Dim sqlAdd As String = Provider=。 DbPassword amp。Data Source= amp。 \data\。 where holderid=39。 Trim() amp。 sqlAdd MsgBox 數據刪除完成! , vbInformation End If End Sub Private Sub Command1_Click() For i = 0 To 10 If i 9 Then (i) = End If Next = = Unload Me End Sub Private Sub Form_Load() Dim rst As New Dim sqlEdit As String sqlEdit = select * from panelinfo sqlEdit = sqlEdit amp。 amp。 39。Jet OLEDB:database password= amp。 。 _ amp。Persist Security Info=False = adUseClient sqlAdd = update panelinfo set holderid=39。 txtUserName(0) amp。,holder=39。 txtUserName(1) amp。,LEndPCode=39。 txtUserName(2) amp。,CopyDate= amp。 ,lightscale= amp。 ,lsfee= amp。 ,lmoney= amp。 ,bmoney= amp。 ,ame=39。 txtUserName(7) amp。,memotext=39。 txtUserName(8) amp。,cEndCode= amp。 ,cFeeMoney= amp。 ,nowecount= amp。 ,atimes= amp。 sqlAdd = sqlAdd amp。 amp。 39。 (5) amp。 dcob 用途 .BoundText MsgBox 數據修改完成! , vbInformation End If End Sub Private Sub Command1_Click() Unload Me End Sub Private Sub dcob 用途 _Click(Area As Integer) Dim rst As New If dcob 用途 .BoundText Then select * from 用戶類型 where ATypeID= amp。 , gCnn, adOpenStatic, adLockBatchOptimistic (5) = Format((2), ) Else MsgBox 請 先添加用戶電表類型信息 ! , vbInformation Exit Sub End If End Sub Private Sub Form_Load() Dim rst As New Dim sqlEdit As String sqlEdit = select * from panelinfo sqlEdit = sqlEdit amp。 amp。 39。 !AtypeID Set dcob 用途 .DataSource = rstJB Set dcob 用途 .RowSource = rstJB dcob 用途 .BoundColumn = ATYPEID dcob 用途 .ListField = ATYPE If 0 Then dcob 用途 .Text = (1) (5) = Format((2), ) End If End Sub Private Sub Form_Unload(Cancel As Integer) (txtUserName(0)) End Sub Private Sub txtUserName_Change(Index As Integer) If Index = 9 Then changeE = cEcount + (Val(txtUserName(9)) changeE) End If End Sub Private Sub UpDown1_Change() = End Sub 9. 開始收費界面設計 : 開始收費代碼設計 : Private Sub CmdPrint_Click() On Error GoTo l Dim LongColor As Long If MsgBox(打印機準備好了嗎? , vbYesNo + vbInformation) vbYes Then Exit Sub End If = False LongColor = = vbWhite = vbWhite = LongColor = True Exit Sub l: MsgBox End Sub Private Sub Command1_Click() Dim rstFeeEnd As New Dim cmdExe As New Dim reMoney As String Dim sqlString As String If Trim(txtFee) = Or Trim(txtM) = Then MsgBox 請先輸入數據! , vbInformation Exit Sub End If reMoney = ConvertMe(Trim(txtFee)) Dim Change As String Change = Val(txtM) Val(txtFee) If Change 0 Then If MsgBox( 實收電費比應收現金大,您確定要這樣收取? , vbYesNo + vbInformation) = vbNo Then Exit Sub End If End If = (0) = = (1) amp。 度 = ¥ amp。 Format(, ) = Date If Change = 0 Then = ¥ amp。 amp。 39。 !AtypeID, gCnn, adOpenStatic, adLockBatchOptimistic If 0 Then = !AType Else MsgBox 用戶類型不能為空! , vbCritical Unload Me End If End If = !Atimes = amp。 Format(!lMoney, ) !nowecount = 0 = !LEndPCode amp。MsgBox (7) !lsFee = Val((7)) Val(txtM) adAffectCurrent sqlString = insert into feels (holderid,holder,feemoney,qianfee,feedate,zhinajin,memols,ame,Ecount) values(39。 (0) amp。,39。 amp。, amp。 , amp。 , amp。 , amp。 ,39。 txtPrint amp。,39。 Guser amp。, amp。 ) = gCnn = sqlString = True = True = False End Sub Private Sub Command3_Click() Unload Me End Sub Private Sub Form_Load() = amp。 (0) amp。導出網格數據到 EXCEL 中 Export rsdg, , 數據查詢 , 日期 : amp。 txtCountA amp。 txtCount amp。拼 Where 語句 whrStr = getWhrStr() 39。 whrStr amp。MsgBox Sqlstr If = 1 Then End If Sqlstr, gCnn, adOpenStatic, adLockOptimistic 39。 whrStr amp。 txtCountA = (1) amp。 amp。功能描述:拼湊 Where 語句 39。拼 Where 語句 whrStr = where 1 = 1 If Trim() Then whrStr = whrStr amp。 amp。 39。% amp。 %39。 amp。 amp。 amp。導出網格數據到 EXCEL 中 Export rsdg, , 數據查詢 , Format(Now, yyyymmdd) End Sub Private Sub cmdQuery_Click() Dim Sqlstr As String Dim whrStr As String Dim feeC As Double Dim znjC As Double 39。取得網格的數據 39。 whrStr amp。MsgBox Sqlstr If = 1 Then End If Sqlstr, gCnn, adOpenStatic, adLockOptimistic Set rsdg = getQueryData(Sqlstr) Set = rsdg MsgBox 數據查詢完成 ,共 amp。 條紀錄! , vbInformation End Sub Private Function getWhrStr() As String 39。返回串值 Dim whrStr As String 39。 and holderid =39。 Trim() amp。 End If If Trim() Then whrStr = whrStr + and holder like 39。 txtUser amp。 End If If Trim() Then whrStr = whrStr + and cFeeMoney= amp。 End If getWhrStr = whrStr End Function Private Sub cmdReturn_Click() Unload Me End Sub Private Sub Form_Unload(Cancel As Integer) If = 1 Then End If End Sub 結束語 本軟件的設計目的是在電表收費管理維護方面為企事業(yè)單位和管理人員提供方便和幫助。經過大量的測試和試用,作者深信本軟件達到了方便和實用的設計目的,并在軟件界面和易用實用等方面有著