【正文】
txtFields(1) = 001 End If Exit Sub AddErr: MsgBox End Sub Private Sub cmdDelete_Click() On Error GoTo DeleteErr If = 0 Then Exit Sub With Dim i As Integer i = MsgBox(確定要?jiǎng)h除嗎? , vbEx。 1 bType = sType For i = 2 To 4 txtFields(i) = s(i) Next Else txtFields(1) = sCkh amp。If Not Then Dim s(2 To 5), sCkh, sType As String Dim i As Integer sCkh = txtFields(1) 39。下列動(dòng)作發(fā)生時(shí)該事件被調(diào)用 Dim bCancel As Boolean Dim i As Integer Static del, add As Boolean Select Case adReason Case adRsnAddNew: add = True Case adRsnClose Case adRsnDelete: del = True Case adRsnFirstChange: change = True Case adRsnMove Case adRsnRequery Case adRsnResynch Case adRsnUndoAddNew Case adRsnUndoDelete Case adRsnUndoUpdate Case adRsnUpdate If del Or add Then del = False: add = False Exit Sub End If If change Then i = MsgBox(數(shù)據(jù)被修改 ,保存嗎? , vbInformation + vbYesNo, 車庫信息 ) If i = vbNo Then adAffectCurrent change = False End If End Select If bCancel Then adStatus = adStatusCancel End Sub Private Sub cmdAdd_Click() On Error GoTo AddErr 39。 Description End Sub Private Sub datPrimaryRS_WillChangeRecord(ByVal adReason As , ByVal cRecords As Long, adStatus As , ByVal pRecordset As ) 39。想要忽略錯(cuò)誤,注釋掉下一行 39。提示保存 = vbDefault End Sub Private Sub datPrimaryRS_Error(ByVal ErrorNumber As Long, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, fCancelDisplay As Boolean) 39。 End If Dim i As Integer For i = 1 To 5 txtFields(i).Enabled = True Next End Sub Private Sub cmdReturn_Click() = YrecordSource End Sub Private Sub cmdMonth_Click() = True End Sub Private Sub cmdSearch_Click() = True Dim i As Integer For i = 1 To 5 txtFields(i).Enabled = False Next End Sub Private Sub bSale_Change() If = 已售 Or = 預(yù)留 Then txtFields(5).Enabled = True = True txtFields(5) = DateValue(Now) Else txtFields(5).Enabled = False = False End If End Sub Private Sub bSale_Click() If = 已售 Or = 預(yù)留 Then txtFields(5).Enabled = True = True txtFields(5) = DateValue(Now) Else txtFields(5).Enabled = False = False End If End Sub Private Sub bSale_LostFocus() If = 已售 Or = 預(yù)留 Then txtFields(5).Enabled = True = True txtFields(5) = DateValue(Now) Else txtFields(5).Enabled = False = False End If End Sub Private Sub dbGarageNo_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Call SearchGarage End If End Sub Private Sub dbGarageNo_LostFocus() Call SearchGarage End Sub Private Sub Form_Load() 39。 dbGarageNo amp。?load 時(shí) If ( Like *9*) Then MsgBox = select * from garage where garageno like 39。啟動(dòng)此窗體時(shí)的記錄源 Public Sub SearchGarage() = False If Trim(dbGarageNo) Then 39。提示保存 Unload Me End Sub 車庫信息 Option Explicit Dim change As Boolean 39。.MoveNext If .EOF Then .MoveLast End If End With Exit Sub DeleteErr: MsgBox End Sub Private Sub cmdUpdate_Click() On Error GoTo UpdateErr If change Then change = False Dim i As Integer i = MsgBox(數(shù)據(jù)已修改,保存嗎? , vbInformation + vbYesNo, 客戶信息 ) If i = vbYes Then adAffectAll 39。繼承輸入 If 0 Then If Not Then Dim s1, s(2 To 8) As String Dim i As Integer s1 = txtFields(0) s1 = Int(s1) + 1 If Len(s1) 5 Then For i = 1 To 5 Len(s1) s1 = 0 amp。驗(yàn)證代碼置于此處 39。 = Record: amp。 Description End Sub Private Sub datPrimaryRS_MoveComplete(ByVal adReason As , ByVal pError As , adStatus As , ByVal pRecordset As ) 39。想要忽略錯(cuò)誤,注釋掉下一行 39。提示保存 = vbDefault End Sub Private Sub datPrimaryRS_Error(ByVal ErrorNumber As Long, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, fCancelDisplay As Boolean) 39。 txtFields(0) Next Else txtFields(0) = i End If If Not Then Next End If End Sub Private Sub Form_Load() 39。返回按鈕已被刪除 (2) = (2) Unload Me End Sub Private Sub cmdZl_Click() 39。提示保存 Unload Me End Sub Private Sub upArea_DownClick(Index As Integer) If Trim(txtFields(Index)) = Then txtFields(Index) = 0 Else If CInt(txtFields(Index)) 0 Then txtFields(Index) = CSng(txtFields(Index)) 1 End If End Sub Private Sub upArea_UpClick(Index As Integer) If Trim(txtFields(Index)) = Then txtFields(Index) = 0 Else txtFields(Index) = CSng(txtFields(Index)) + 1 End If End Sub 客戶信息 Option Explicit Dim change As Boolean 39。.MoveNext If .EOF Then .MoveLast End If End With Exit Sub DeleteErr: MsgBox End Sub Private Sub cmdUpdate_Click() On Error GoTo UpdateErr If change Then change = False Dim i As Integer i = MsgBox(數(shù)據(jù)已修改, 保存嗎? , vbInformation + vbYesNo, 房產(chǎn)信