J
J Shrimps, Jr.
Have a table I need to search based on a form control.
More than one value may be returned, but Dlookup
only returns the first value.
Using an SQL statement to return all the matching
values doesn't work - always get "Expecting paramater
1" or 2. Howver, pasting the exact same SQL statement
into the query designer DOES return the correct records.
I don't know why I can't -
Set rst = db.OpenRecordset("SELECT tbl.State as states FROM tblStates;")
but it doesn't work - of course the sql statement is more difficult and
includes form controls - but the sql works in Query designer.
Is there a way to get more than one return from Dlookup?
More than one value may be returned, but Dlookup
only returns the first value.
Using an SQL statement to return all the matching
values doesn't work - always get "Expecting paramater
1" or 2. Howver, pasting the exact same SQL statement
into the query designer DOES return the correct records.
I don't know why I can't -
Set rst = db.OpenRecordset("SELECT tbl.State as states FROM tblStates;")
but it doesn't work - of course the sql statement is more difficult and
includes form controls - but the sql works in Query designer.
Is there a way to get more than one return from Dlookup?