dropdown to filter records

I

iccsi

I have a dropdown on the form and would like to filter records on the
form chosen by users.

It works for the filter, but I have issue when user leave it blank to
have all recrods without filter.

I tried to use [MyField] = [forms]![MyForm]![MyDropDown] or [forms]!
[MyForm]![MyDropDown] is null in the form filter property which filter
empty dataset. It seems the [MyForm]![MyDropDown] is null is true.

I tried to my form bound to a query and query has the criteria base on
the dropdown, but form failed to load, since the dropdown is not
created.

Any suggestions are appreciated,
 
D

Douglas J. Steele

Are you saying that you're trying to use a combo box on the form to filter
that form?

In what event do you have the code to set the filter? If it's the form's
Open event, move it to the form's Load event.
 

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