Multiple Listboxes and Control Range

G

Guest

I have a form with 4 listboxes and 1 set of text boxes for a Date Range that
i want to use as selection criteria to pull up a report. I have been able to
pull the report with one list box and the date range but it will not work
with more than one listbox. I am using Where condition.
 
J

JP

It should work provided that you correctly build your where condition, which
would probably be something like

"fielda = '" & listbox1.value & "' and fieldb = '" & listbox2.value & "' and
fieldc = '" & listbox3.value & "' and fieldd = '" & listbox4.value & "' and
datee >= #" & date_text_box_1.value & "# and datef <= #" &
date_text_box_2.value & "#"

Note that the above assumes all the fields are being searched with text
values. For number fields, remove the single quotes.
 

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