dropdown to filter records

  • Thread starter Thread starter iccsi
  • Start date Start date
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,
 
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.
 
Back
Top