How-to create dynamic where clause

T

Tim

I have a query and I want the user to be able to select
from a list box to limit what's returned. From the
selections made, I create a string in a text box in order
to pass to the query

I put "IN ([FORMS]![frmReports]![txtCriteria])" in the
where clause. This works if I select 1 item from the
list box. If I select more than 1, I get an empty
resultset.

Any help would be greatly appreciated.

Thanks,
Tim
 
S

Sal Rosario

It has to do with the way List Boxes pass data back to your queries. I
normally use VBA code to process the data passed from list boxes and build
my recordsets.

Regards,

Sal Rosario
Database Cosultant in NJ
www.salrosario.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top