learn_to_program
Feb 22nd, 2000, 03:31 PM
hi,
I have this problem on the program I am writing, the code is as follow:
Private Sub adoClients_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
Dim strQuery As String
strQuery = "select Service, ServiceDate from tblServices where clientID = " & adoClients.Recordset!ClientID
adoServices.CommandType = adCmdText
adoServices.RecordSource = strQuery
adoServices.Refresh
End Sub
--------------------------------------------
Private Sub mnuAdd_Click()
adoServices.Recordset.AddNew
adoClients.Recordset.AddNew
End Sub
--------------------------------------------
when i run the program and try to add a new records, it will give me a syntax error on ClientID ="". How can i bypass this problem?
thanks in advance
I have this problem on the program I am writing, the code is as follow:
Private Sub adoClients_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
Dim strQuery As String
strQuery = "select Service, ServiceDate from tblServices where clientID = " & adoClients.Recordset!ClientID
adoServices.CommandType = adCmdText
adoServices.RecordSource = strQuery
adoServices.Refresh
End Sub
--------------------------------------------
Private Sub mnuAdd_Click()
adoServices.Recordset.AddNew
adoClients.Recordset.AddNew
End Sub
--------------------------------------------
when i run the program and try to add a new records, it will give me a syntax error on ClientID ="". How can i bypass this problem?
thanks in advance