combo box selection returning too many records

B

bicyclops

I've generally had good success filtering continuous forms with combo boxes
using criteria like this:
Like [Forms]![FrmAssyStatus2]![CboOrderID] & "*"

In the above case though, the OrderID field being numeric, choosing '79' in
the combo box returns orders 79,790,791,798, etc.

I understand that the Like statement turns the criteria into text, which is
what I don't want; however, the & "*" part won't work without it.

How can I give the users just order 79 when that is picked, and all orders
when nothing is picked?

Thanks in advance.
 
O

Ofer

Try this

Like NZ([Forms]![FrmAssyStatus2]![CboOrderID] , "*")

Or
Like IIf([Forms]![FrmAssyStatus2]![CboOrderID] Is Null Or
[Forms]![FrmAssyStatus2]![CboOrderID] = "", "*" ,
[Forms]![FrmAssyStatus2]![CboOrderID])
 

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