crosstab query

A

alm09

I want a crosstab query to return all records unless the user specifies a
particular account number by updating a combo box on a form. The criteria I
have in the crosstab query is as follows:

IIf(IsNull([Forms]![Form Name]![Combo7]),"*",[Forms]![Form Name]![Combo7])

When I input an acct number using the combo box the query works and returns
only those related records. When I leave the combo box null (i.e. do not
update it) and want all records returned I get zero records returned, when,
in fact, I am expecting thousands of records.

Any suggestions?
 
J

John Spencer

Try putting LIKE in front of the expression.

LIKE IIF(...)

or enter the following as the criteria
Field: Whatever
Criteria: [Forms]![Form Name]![Combo7] or [Forms]![Form Name]![Combo7] Is
Null

In the SQL statement that would be

WHERE Whatever = [Forms]![Form Name]![Combo7] or [Forms]![Form
Name]![Combo7] Is Null

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top