Hello everyone,
I have a form with an unbound control linked to a query. So I can put an item name in the control and the query returns all records for that one item. For example, in the query criteria I have
'Like [forms]![formname]![itemname] & '*').
Is it possible to use the same underlying query to search my records via the item name or by date. For examples,
Date Criteria in query:
IIf(IsNull([forms]![formname]![itemname]), Then Like [forms]![formname]![datename],)
So if the item name isn't entered but the date is then search by date. If the item name is entered then do not search.
Item Criteria in query
IIf(IsNull([forms]![formname]![date]), Then Like [forms]![itemname]![datename],).
Is this possible? I've tried it but the returned search remains emtpy.
any advice would be great,
thanks
Sue
I have a form with an unbound control linked to a query. So I can put an item name in the control and the query returns all records for that one item. For example, in the query criteria I have
'Like [forms]![formname]![itemname] & '*').
Is it possible to use the same underlying query to search my records via the item name or by date. For examples,
Date Criteria in query:
IIf(IsNull([forms]![formname]![itemname]), Then Like [forms]![formname]![datename],)
So if the item name isn't entered but the date is then search by date. If the item name is entered then do not search.
Item Criteria in query
IIf(IsNull([forms]![formname]![date]), Then Like [forms]![itemname]![datename],).
Is this possible? I've tried it but the returned search remains emtpy.
any advice would be great,
thanks
Sue