【正文】
ick() = 收入查詢 = 4200 = 4081 = 495 = 2055 = 輸入名稱 End Sub Private Sub cz_Click() 2 End Sub Private Sub dc_Click() 0 End Sub Private Sub glysx_Click() End Sub Private Sub gy_Click() End Sub Private Sub MDIForm_QueryUnload(Cancel As Integer, UnloadMode As Integer) Dim YesNo As Integer Dim M As Single YesNo = MsgBox(真的要退出系統(tǒng)嗎? , vbYesNo + vbQuestion, 提示 ) If YesNo = vbYes Then EndTxt = True Unload Me Else Cancel = 1 End If End Sub Private Sub pp_Click() 1 End Sub Private Sub stsz_Click() = 6930 = 8400 End Sub Private Sub tc_Click() Unload Me End Sub Private Sub Toolbar1_ButtonClick(ByVal Button As ) Select Case Case key1 = 8355 = 13710 Case key2 = 9510 = 13875 Case key3 = 6795 = 10020 = True = 輸入群組名進(jìn)行查詢 Case key4 Case key7 = 6930 = 8400 Case key6 Unload Me End Select End Sub 客戶信息管理: 本應(yīng)用模塊的主要功能是實(shí)現(xiàn)對客戶個(gè)人信息的錄入系統(tǒng)操作,如編號,姓名,性別,性別等基本操作。從而完成本系統(tǒng)的客戶信息管 理。 代碼如下: Private Sub Command1_Click() = True = True = True = True = True = True = True = True = True = True = True If = True Then If = True And = True Then MsgBox 您的數(shù)據(jù)庫中沒有記錄! , 16, 出錯(cuò): Else If = 修改記錄 Then 39。 = 修改完畢 39。 = False 39。 = False 39。 = False 39。 = False = 8220 = 300 39。 = True 39。 = 修改記錄: Else If = Then MsgBox 姓名不能為空! , 16, 出錯(cuò): Else For X = 11 To 13 If Len(Trim()) 200 Then MsgBox 太長 , 16, 出錯(cuò): Exit Sub End If Next X 39。 = 修改記錄 39。 = True 39。 = True 39。 = True 39。 = True 39。 = 5728 39。 = 600 39。 = 1500 39。 = False 39。 = 數(shù)據(jù)輸入: End If End If End If End If End Sub Private Sub Command2_Click() If = True Then MsgBox 刷新成功! , 16, 恭喜: Else End If 39。MsgBox 刷新成功! , 16, 恭喜: End Sub Private Sub Command5_Click() = True = True = True = True = True = True = True = True = True = True = True If = Or = Then MsgBox 編號或姓名不能為空! , 16, 出錯(cuò): = = 男 Else MsgBox 開始添加信息! , 64, 恭喜! = False = False = False End If End Sub Private Sub Command6_Click() If = True And = True Then MsgBox 您的數(shù)據(jù)庫中沒有信息可以刪除! , 16, 出錯(cuò)! Else MsgBox 您確定要?jiǎng)h除這條信息? , 32, 出錯(cuò)! If = False Then Else 39。MsgBox 您的數(shù)據(jù)庫中沒有信息可以刪除! , 16, 出錯(cuò)! End If End If End Sub Private Sub Command7_Click() If = Or = Then MsgBox 編號或姓名不能為空! , 16, 出錯(cuò): = Else MsgBox 信息保存完畢! , 16, 恭喜! = True = True = True End If End Sub Private Sub Command8_Click() Unload Me End Sub Private Sub Form_Unload(Cancel As Integer) If = True Then Cancel = 0 Else MsgBox 請編輯完這條記錄再退出!若不編程請選擇任一 記錄保存后退出 , 64, 提示: Cancel = 1 End If End Sub 客戶信息查詢: 本功能模塊是本系統(tǒng)的查詢功能模塊,用戶可以在本模塊上進(jìn)行按條件進(jìn)行查詢,也可以按編號和姓名進(jìn)行查詢。 代碼如下: Private Sub Command1_Click() If = True Then MsgBox 這已經(jīng)是第一條信息了! , 16, 出錯(cuò): Else End If End Sub Private Sub Command2_Click() If = True Then MsgBox 已經(jīng)到最后一條記錄了! , 16, 提示! Else End If End Sub Private Sub Command3_Click() If = True Then MsgBox 這已經(jīng)是第一條信息了! , 16, 出錯(cuò): Else End If End Sub Private Sub Command4_Click() If = True Then MsgBox 已經(jīng)到最后一條記錄了! , 16, 提示! Else End If End Sub Private Sub Command5_Click() If = Then MsgBox 沒有輸入查詢條件! , 16, 提示! = End If Do While True If (姓名 ).Value = Then = (姓名 ).Value Exit Do End If Loop = End Sub Private Sub Command6_Click() If = Then MsgBox 沒有輸入查詢條件! , 16, 提示! = End If Do While True If (客戶編號 ).Value = Then = (客戶編號 ).Value Exit Do End If Loop = End Sub 群組設(shè)置: 進(jìn)行對群組消費(fèi)客戶管理,以實(shí)現(xiàn)大客戶的維護(hù)管理以及完善售后服務(wù)工作。 代碼如下: Private Sub Command1_Click() = True = True = True = True = True = True = True If = True Then If = True And = True Then MsgBox 您的數(shù)據(jù)庫中沒有記錄! , 16, 出錯(cuò): Else If = 修改記錄 Then = 設(shè)置完畢 = False = False = False = False = 8220 = 300 = True = 修改記錄: Else If = Then MsgBox 姓名不能為空! , 16, 出錯(cuò): Else For X = 11 To 13 If Len(Trim()) 200 Then MsgBox 太長 , 16, 出錯(cuò): Exit Sub End If Next X = 修改記錄 = True = True = True 39。 = True = 5728 = 600 = 1500 = False = 數(shù)據(jù)輸入: End If End If End If End If End Sub Private Sub Command2_Click() If = Or = Then MsgBox 名稱和管理員不能為空! , 16, 出錯(cuò): Else MsgBox 成功保存! , 64, 恭喜 ! = True = True 39。 = True End If End Sub Private Sub Command3_Click() = True = True = True = True = True = True = True If = Or = Then MsgBox 名稱和管理員不能為空! , 16, 出錯(cuò): = Else MsgBox 開始新建群組! , 64, 恭喜! = False = False = False End If End Sub Private Sub Command4_Click() If = True And = True Then MsgBox 您的數(shù)據(jù)庫中沒有信息可以刪除! , 16, 出錯(cuò)! Else MsgBox 您確定要?jiǎng)h除這條信息? , 32, 提示! If = False Then Else MsgBox 您的數(shù)據(jù)庫中沒有信息可以刪除! , 16, 出錯(cuò)! End If End If End Sub Private Sub Form_Unload(Cancel As Integer) If = True Then Cancel = 0 Else MsgBox 請編輯完這條記錄再退出! , 64, 提示: Cancel = 1 End If End Sub 4. 6 用戶管理 一個(gè)完整的應(yīng)用系統(tǒng),必須要能夠具備適當(dāng)?shù)挠脩艄芾砉δ?,以防系統(tǒng)數(shù)據(jù)的安全。在這里,有幾個(gè)實(shí)用的功能,一是系統(tǒng)密碼修改功能,以防止系統(tǒng)的密碼泄露之后,管理員能夠及時(shí)地進(jìn)行密碼更新,以防系統(tǒng)的資料被別人竊取和修改。 代碼如下: Private Sub Command1_Click() If = True And = True Then MsgBox 您輸入的第一個(gè)管理員是系統(tǒng)管理員,是用來 設(shè)置用戶的,請不要?jiǎng)h除! , 64, 提示: = 1 = False = False End If If = 添加 Then = 0 = 0 = True = 添加完畢 = False = False = Fal