A
angie
i have a query consisting of the following fields: description, date and
amount. i have created two more fields-expressions. i.e. Expr1=Month([date])
and Expr2=Year([date]).
i have a main form which consists of three combos that serve as criteria
selection for my query: combo1=description selection, combo2=month selection
and combo3=year selection.
i have entered the following criteria in my query: description field=iif
([forms]![main form]![combo1] is null;[description];[forms]![main
form]![combo1]) which works fine, that is if the combo has no data the query
returns all the records and if the combo has criteria the query filters the
records accordingly.
i have entered the same criteria (with the corresponding combo and field
names in the iif function) for Expr1 and Expr2 and the query does not work
properly.
why is this happening? how can i solve this problem?
amount. i have created two more fields-expressions. i.e. Expr1=Month([date])
and Expr2=Year([date]).
i have a main form which consists of three combos that serve as criteria
selection for my query: combo1=description selection, combo2=month selection
and combo3=year selection.
i have entered the following criteria in my query: description field=iif
([forms]![main form]![combo1] is null;[description];[forms]![main
form]![combo1]) which works fine, that is if the combo has no data the query
returns all the records and if the combo has criteria the query filters the
records accordingly.
i have entered the same criteria (with the corresponding combo and field
names in the iif function) for Expr1 and Expr2 and the query does not work
properly.
why is this happening? how can i solve this problem?