|
-
Jun 4th, 2002, 01:05 AM
#1
Thread Starter
Fanatic Member
.Find two fields
How can I use the .Find method using 2 fields?
For a single field (Field), this is how to do it:
VB Code:
RS.Find "Field = '" & value
HOw about if Im going to search in two fields? I used AND but Vb complained. Please help.
On Error GoTo Hell
Hell:
Kill Me
Food For Thought:
- Do not judge a book... if you're not a judge!

-
Jun 5th, 2002, 03:25 AM
#2
You can't.
At least not like that.
Use the Where clause for multiple field searches, although this will mean a filtered recordset...
Vince
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
-
Jun 5th, 2002, 06:28 AM
#3
You can filter on the recordset
VB Code:
RS.Filter = "Field = '" & value & '" AND Field2 = '" & value2 & "'"
I see you placed a qoute before the value and not after it.
If it is a string your searching on you have to place it between a single qoute.
-
Jun 5th, 2002, 07:16 AM
#4
Use SQL and you can search on as many fields as you want.
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
|