|
-
September 20th, 2004, 06:50 AM
#1
Find a record using ADODC - "LIKE *"
How to find a record using ADODC.find method to find a record "LIKE variable*"
I want to use a variable + * , ie if content is "B" then it should take "LIKE 'B*'". Here instead of 'B' I want to use the variable name itself.
-
September 20th, 2004, 07:16 AM
#2
Re: Find a record using ADODC - "LIKE *"
Will this do ur work.
Code:
Adodc2.CommandType = adCmdText
Adodc2.RecordSource = "SELECT * from qryInterests1 WHERE [Gender] like '%" & Gender & "%'"
Adodc2.RecordSource = "SELECT * from qryInterests1 WHERE [Age] = '" & age & "'"
Adodc2.Refresh
If Adodc2.Recordset.EOF Then
MsgBox "No records found", vbOKOnly
End If
-
September 20th, 2004, 05:22 PM
#3
Re: Find a record using ADODC - "LIKE *"
Careful which DB you are using too - some use "*" as the wildcard, others use "%", so if it doesn't work with one, try it with the other.
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
|