|
-
Feb 22nd, 2000, 04:31 PM
#1
Thread Starter
New Member
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
-
Feb 22nd, 2000, 08:32 PM
#2
Lively Member
Depends on the data type of Client ID
try this
strQuery = "select Service, ServiceDate from tblServices where clientID = '" & adoClients.Recordset!ClientID & "'"
-
Feb 23rd, 2000, 03:00 PM
#3
Thread Starter
New Member
Depends on the data type of Client ID
try this
strQuery = "select Service, ServiceDate from tblServices where clientID = '" & adoClients.Recordset!ClientID & "'"
Thanks for helping!
ClientID is a long Datatype and it still give me the error message after i input in the "", when i debug it, it give me a null field in the query.
how to bypass this error?
Thanks in advance
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|