Filter from a form

Jack Daniels

Registered User.
Local time
Today, 15:01
Joined
Oct 25, 2004
Messages
36
Hi!

I have a db in access 2003. I have a form frnStat, where I have 6 different fields. The meaning with the form is that a user can fill the fields that they want, and in that way decide what information they want from the the table tblBookings. I use the information from the fields in a queery, qryFilt. Then it generates a report rptStatistics wich also catch the information from frmStat and the filtered data.

I use a formula like this in the querry [Forms]![frmStat]![FirstDate] to catch the input from the form.

But if a user don´t fill in all of the 6 fields it doesn´t work.

Can I in some way write a formula that says:

"If a field is not filled ignore it

So if a user just fills in three of these fields, she get the information filtered by those three fields. s this possoble, and in that case, how?

Jack
 
Try this

Like Iif(IsNull([Forms]![frmStat]![FirstDate]),"*",[Forms]![frmStat]![FirstDate])

You'll need to put this in the criteria fiel uder each of you fields, with correct field names
 

Users who are viewing this thread

Back
Top Bottom