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

Query Criteria [Forms]![Collections_MASTER]![Combo118] OR show All

P: 6
In MS Access 2010 I am trying to use the
Expand|Select|Wrap|Line Numbers
  1. =[Forms]![Collections_MASTER]![Combo118] 
  2.  
in the criteria for field [Teams] and it works fine.

But if the combo is blank it shows nothing, can I make it so the blank combo shows everything, ie no criteria is applied...

Thanks in advance
Feb 16 '12 #1
Share this Question
Share on Google+
6 Replies


P: 6
I tried the code below but no luck;
Expand|Select|Wrap|Line Numbers
  1. IIf([Forms]![Collections_MASTER]![Combo118] Is Not Null,[Forms]![Collections_MASTER]![Combo118])
  2.  
Feb 16 '12 #2

Rabbit
Expert Mod 10K+
P: 12,366
Is it blank or is it null? They are different and you need to use the right one. Also, your IIf syntax is missing the return value for the false parameter.
Feb 16 '12 #3

P: 6
I found that this works;

Expand|Select|Wrap|Line Numbers
  1. [Forms]![Collections_MASTER]![Combo118] Or [Forms]![Collections_MASTER]![Combo118] Is Null
  2.  
However when I try to use on more than one field it doesn't like it.
Im also using After Update - requery on unbound combo boxes (not sure about this bit???)

Thanks
Feb 16 '12 #4

NeoPa
Expert Mod 15k+
P: 31,489
SmartCarFun:
However when I try to use on more than one field it doesn't like it.
You'll need to explain yourself better than that if we're to understand what you mean.
SmartCarFun:
Im also using After Update - requery on unbound combo boxes (not sure about this bit???)
Again, what is this even about?

NB. The solution you came up with shows you're thinking well and on the right lines. I have no idea what problems you're having with it due to how it was expressed.
Feb 16 '12 #5

P: 6
Thanks for your reply, I appreciate it's difficult to understand...

Not to waste your time, ive moved on to VBA code so I have opened a new thread you might be able to look at, its the same problem (a little further along) but a different approach.

Thanks a mill


http://bytes.com/topic/access/answer...se#post3703762
Feb 17 '12 #6

NeoPa
Expert Mod 15k+
P: 31,489
Running late so rushing away.

I'll look at the linked thread when I can. I notice you say it has two questions in it though. It may be wise in the mean time to reorganise it so that each question is in its own thread. We only allow one question per thread (Everybody benefits from this approach). Nice idea to split to a new thread though ;-)
Feb 17 '12 #7

Post your reply

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