【正文】
to continue ?, vbYesNo + vbInformation) = vbYes Then StrSql = delete from tVip where cVipID=39。 amp。 Trim() amp。 39。 StrSql CheckConnect 39。To break objrs if it is opened If ConnectToServer = True Then Set objRs = New StrSql = select * from tvip GetData StrSql 39。Reference function in order to get data Set = objRs = True 39。Exectue refresh in order to list data when form load ColNamechange 39。Reference fuction to change columns name to chinese End If End If CheckConnect 39。To break objrs if it is opened If ConnectToServer = True Then Set objRs = New StrSql = select * from tvip GetData StrSql 39。Reference fuction to get data Set = objRs = True 39。Exectue refresh in order to list data when form load ColNamechange 39。Reference fuction to change columns name to chinese End If End If End IfEnd SubPrivate Sub cmdModify_Click() If Empty_Check = True Then Exit Sub 39。Reference function to check is your database is empty If Trim() Trim((0).Value) Then Exit Sub 39。To check vipID If = 修改(amp。M) Then = 確定 = False = False = False Else If MsgBox(Are you sure to modify this record , vbYesNo + vbInformation) = vbYes Then With objRs If Not .EOF And .RecordCount 0 Then .Fields(0).Value = Trim() .Fields(1).Value = Trim() 39。 .Fields(2) = vipsex .Fields(3) = Trim() .Fields(4) = Trim() .Fields(5) = Trim() .Fields(6) = Trim() .Fields(7) = Trim() .Update End If End With = 修改(amp。M) = True = True = True End If End IfEnd SubPrivate Sub cmdRefresh_Click() RefreshVip 39。Reference refreshvip function to refreshEnd SubPrivate Sub dgdVip_RowColChange(LastRow As Variant, ByVal LastCol As Integer) If checkAddNew = True Then Exit Sub = TrueEnd SubPrivate Sub Form_Activate() FormMiddle frmVipReg 39。Reference function to make form in MDIForm39。mddile If ConnectToServer = True Then Set objRs = New StrSql = select * from tvip GetData StrSql 39。Reference function in order to get data Set = objRs = True 39。Exectue refresh in order to list data when form load ColNamechange 39。Reference fuction to change columns name to chinese End IfEnd SubPrivate Sub cmdQuery_Click() CheckConnect 39。If objRs is open then close it If ConnectToServer = True Then Set objRs = New If optCheck(0).Value = True Then 39。This is check if your query by is null If Trim() = Then MsgBox Please input book ID in order to query !, vbInformation + vbOKOnly Exit Sub End If StrSql = select * from tBooks where cBooksID=39。 amp。 Trim(txtbookID) amp。 39。 GetData StrSql 39。Reverence function to ger data If = 0 Then MsgBox This book do not exist,please input another books ID or choose another query way !, vbInformation + vbOKOnly = optCheck(0).Value = False EnabledSet 39。Reference function to set checkbox enabled CheckConnect 39。Reference function if objrs is open then close it Exit Sub End If optCheck(0).Value = False ElseIf optCheck(1).Value = True Then 39。This is check if your query way is null If Trim() = Then MsgBox Please input book name in order to query !, vbInformation + vbOKOnly Exit Sub End If StrSql = select * from tBooks where cBooksName like39。% amp。 Trim() amp。 %39。 GetData StrSql 39。Reference function to get data If = 0 Then MsgBox This book do not exist,please input another book name or choose another query way!, vbInformation + vbOKOnly = optCheck(1).Value = False EnabledSet 39。Reference function to set checkbox enabled CheckConnect 39。Reference function if objrs is open then close it = False Exit Sub End If optCheck(1).Value = False ElseIf optCheck(2).Value = True Then 39。This is check if your query by is null If Trim() = Then MsgBox Please input bookAuthor name in order to query !, vbInformation + vbOKOnly 39。Reference function to ger data Exit Sub End If StrSql = select * from tBooks where cBooksAuthor like39。% amp。 Trim() amp。 %39。 GetData StrSql 39。Reference to get data If = 0 Then MsgBox This author do not exist,please input another author or choose another query way!, vbInformation + vbOKOnly = EnabledSet 39。Reference function to set checkbox enabled CheckConnect 39。Reference function if objrs is open then close it optCheck(2).Value = 0 = False Exit Sub End If optCheck(2).Value = False ElseIf optCheck(3).Value = True Then 39。This is check if your query is null If Trim() = Then