combo box selection returning too many records

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
Try this

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

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