Blank txt boxes in forms

C

Calvin

Good morning!
I have a form that the user can chose different restraints
to be printed out on a report(Date range, Squre Foot
Range, State....) Each text box in linked to criteria in
a Query that is liked to a report. The problem is if the
user does not fill in one of the restaints, then the
report prints out blank. I need it so if State is left
blank, then all the states are choosen for the criteia in
the Query and the rest of the criteria is met from the
other restraints. I hope this makes sense, and thank you
for your help.
Example txtstate = ______
txtminDate = 3/3/00
txtmaxDate = 3/3/03
The report would print out all the states information from
3/3/00 to 3/3/03
 
M

Marshall Barton

Calvin said:
I have a form that the user can chose different restraints
to be printed out on a report(Date range, Squre Foot
Range, State....) Each text box in linked to criteria in
a Query that is liked to a report. The problem is if the
user does not fill in one of the restaints, then the
report prints out blank. I need it so if State is left
blank, then all the states are choosen for the criteia in
the Query and the rest of the criteria is met from the
other restraints. I hope this makes sense, and thank you
for your help.
Example txtstate = ______
txtminDate = 3/3/00
txtmaxDate = 3/3/03
The report would print out all the states information from
3/3/00 to 3/3/03


Change the criteria in the query to include a test for the
text box being null:

State = Forms!theform.txtState OR Forms!theform.txtState Is
Null
 

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