Selecting No Parameter for a Report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created a report that prompts the user for a value via a dialog box.
I accomplished this by following the steps in the help file.

However, if the user does not select or enter a value, the report returns no
results. For instance, if I my parameter is State, I would like an empty
value to display all entries.

I have tried putting an IF statement in the underlying query to this effect:

IF (value from form) = "" THEN Parameter = ""

Logically, giving no parameter shouldn't restrict output, but that doesn't
seem to work.

I have forms that have both text boxes and list boxes.

Any thoughts?
 
-----Original Message-----
You can set the criteria prompt to
Nz([Enter State], [StateField])

--
Duane Hookom
MS Access MVP


I have created a report that prompts the user for a
value via a dialog
box.
I accomplished this by following the steps in the help file.

However, if the user does not select or enter a value,
the report returns
no
results. For instance, if I my parameter is State, I would like an empty
value to display all entries.

I have tried putting an IF statement in the underlying
query to this
effect:
IF (value from form) = "" THEN Parameter = ""

Logically, giving no parameter shouldn't restrict output, but that doesn't
seem to work.

I have forms that have both text boxes and list boxes.

Any thoughts?


.
Try a parameter query in the format:-
< Like [Which State is required ?] & "*" >
Entering "w" will return all records beginning with "w"
"wi" will return all records beginning with "wi"
no entry will return all records.
 
Back
Top