By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,098 Members | 1,895 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,098 IT Pros & Developers. It's quick & easy.

use a combobox with no selection as "all values" in a query

P: 4
I have a sub form that is populated based on the selection of a year from a combo box on the main form. I'm trying to add a second main form combo box for item category to further filter the sub form; however, I'd like the item category combo box to be interpreted as "all values" if no selection is made. I've tried using an IIf statement in the underlying query of the sub form to either use the value of the item category combo box if it has a selection, or set it to "*" if it doesn't, but haven't been able to make it work. If this approach isn't workable, my other plan was to programatically set the record source of the sub form to 1 of 2 queries that either include or exclude the item category combo box based on whether or not the item category combo box has a selection.

thoughts and suggestions?

Oct 31 '08 #1
Share this Question
Share on Google+
1 Reply

P: 4
Nevermind...went the selective record set route and it works like a charm.
Oct 31 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.