Help with null parameter

G

Guest

I have two parameters, this first one I would like to type in the parameter I
am looking for, it is for a field called Street name so in the 1query in the
criteria I have the following. [Street Name:] no the second parameter I would
like to some times to type in a parameter, but also would like to show all
fields the fit the first parameter and plus all of the Affiliates which is
the name of the field. The second Parameter is Affiliate, so I have the
criteria in the query as follows [Affiliate or affiliate = null:]. When I do
this neither parameter works and I get no data at all. Any help! Thanks in
advance.
 
J

Jeff Boyce

Mike

It sounds like you might be trying to handle an "OR" situation. Are you
saying you want to see rows if:

StreetName = [Street Name] AND Affiliate = [Affiliate]
OR if
StreetName = [Street Name] AND Affiliate IsNull

If this is what you are after, you can use a second line of criteria to get
the OR condition.
 
G

Guest

You can put a variable field in your query which would be an expression like
this:

VarAffiliate: IIF(IsNull([Affiliate]),"0",[Affiliate])

Then on the criteria line of the field put something like:

Between Forms![frmReportMenu]![Affiliate] and
Forms![frmReportMenu]![Affiliate]

The field "Affiliate" on the Report Menu screen would need to be an unbound
field. This will give you either all Affilitates if the unbound field is
blank or just the Affilitate chosen. If you wish to have a range of
Affilitiates, create an unbound EndAffiliate field and refer to it in your
between statement.

Hope this helps.
Jackie
 

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