PDA

Click to See Complete Forum and Search --> : ADO - Syntax


hyme
Nov 16th, 2000, 09:49 AM
Howdy!

I need the syntax for a find statement with multiple criteria.

This works with one field, but I need 3 more fields.

strField = "Hello"
criteria = "Field1 = '" & strField & "'"

adoPrimaryRS.Find criteria, , adSearchForward, 1
If adoPrimaryRS.EOF = True Then Exit Sub

Thanx.

[Edited by hyme on 11-16-2000 at 11:06 AM]

vbuser1976
Nov 16th, 2000, 11:03 AM
Okay, I am not sure of what you are asking, but I'll try.

The way I have done it is like this:


criteria = "Field 1 = " & field1 & ", Field 2 = " _
& Field2 & ", Field 3 = " & field3 & ""


I hope this is what you were looking for.

hyme
Nov 16th, 2000, 11:06 AM
Yep, That's it.
Thanx.
I forgot the comma's

vbuser1976
Nov 16th, 2000, 11:23 AM
No problem.