Howie Lane
asked on
ms access filter query with empty combobox
Hello,
I am quite new to Access. I am trying to create a GUI that allows user to search through the database. Currently the form (connected to a query connected to a report) I am working on has a Genus and a Year look up (both combo boxes). I would like the user to be able to select the genus and leave the Year combo box empty.
So for the the query of the Year field i have
WHERE [Year Published] = [Forms]![frmSearchGenusYea r]![cboSea rchYear] OR [Forms]![frmSearchGenusYea r]![cboSea rchYear] & "" = ""
When I leave the year combo box empty but select a genus the report runs everything.
How can I select the genus, leave the year blank to achieve all the years for that specific genus?
I am quite new to Access. I am trying to create a GUI that allows user to search through the database. Currently the form (connected to a query connected to a report) I am working on has a Genus and a Year look up (both combo boxes). I would like the user to be able to select the genus and leave the Year combo box empty.
So for the the query of the Year field i have
WHERE [Year Published] = [Forms]![frmSearchGenusYea
When I leave the year combo box empty but select a genus the report runs everything.
How can I select the genus, leave the year blank to achieve all the years for that specific genus?
you are using the same combo box
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you!
You are welcome :-)