Report based on Check boxes in a form

B

bigbore50

Hello all,

I have a form with 5 check boxes. I want to run a query based on
the check boxes that are selected. Then I would like to use the values
in that query to create a report.

Table example:

Date Description Price Model Type
New/Used
3/15/06 JD550 10000
Dem N
3/28/06 WX345 12478 Pwx N
3/6/06 TP0567 35879 Uwp
U
3/18/06 SX06 45721
Nfb N



The check boxes I want in my form are

New [] Pwx []
USED [] Dem []
Uwp []
Nfb []

Basically they can select all the check boxes or just one and I would
like the query to find the values that they have selected.

Is this possible without using code?
If so what would the code look like?

Thanks a lot
 
M

Michel Walsh

It is possible, but it may not be very efficient, at run time.


SELECT *
FROM tableName
WHERE FORMS!fn!new IMP [New/Used]='N'
AND FORMS!fn!used IMP [New/Used]='U'
AND FORMS!fn!pwx IMP [Model Type]='PWX'
AND FORMS!fn!dem IMP [Model Type]='DEM'
AND FORMS!fn!uwp IMP [Model Type]='UWP'
AND FORMS!fn!nfb IMP [Model Type]='NFB'




replace fn by the real form name.


Hoping it may help,
Vanderghast, Access MVP
 

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