Reference to a ComboBox on a Form

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

Guest

Hi friends

I have a query with one field's criteria with a reference to a combobox on a
form. When nothing is selected (Datatype is text) I want all records to by
shown, when a certain text is selected, only the records with the selected
text should be shown. But it doesn't work..

The reference is like this:

IIf([forms]![frmExportSklad].[sklad]is not
null;[forms]![frmExportSklad].[sklad];Is Not Null)

I have also tried the alternative isnull(..) same result: If the there is
value in the combobox, it works, if not, nothing is shown.

Thanks for any help!
 
If your field is a text field you could try:

Like Nz([forms]![frmExportSklad].[sklad],"*")

Or the following variant which will return every records that has a value
in the field

= Nz(([forms]![frmExportSklad].[sklad],[TableName].[FieldName])

Where you reference the field you are applying the criteria against.
 
Back
Top