Hi
I am try ing to create a query that sorts records in a table based on a filed on a form in order to produce a report.
I have a field on a form called customer
in my query for the report I want to sort customers in my table by their name if given on the form or to show all records if not.
I came up with the following code in my criteria
iif(isnull(forms![tender]![customer]),like *,forms![tender]![customer])
the like * i was trying to use as a wild card for all customers if the field on the form was left blank.
if I enter a valid name on my form the query runs fine. but If I leave the field blank then I do not get to see any record where I want them all.
Thanks for any help in advance
I am try ing to create a query that sorts records in a table based on a filed on a form in order to produce a report.
I have a field on a form called customer
in my query for the report I want to sort customers in my table by their name if given on the form or to show all records if not.
I came up with the following code in my criteria
iif(isnull(forms![tender]![customer]),like *,forms![tender]![customer])
the like * i was trying to use as a wild card for all customers if the field on the form was left blank.
if I enter a valid name on my form the query runs fine. but If I leave the field blank then I do not get to see any record where I want them all.
Thanks for any help in advance