Need help with Query

S

Sianboy

Hey I got a query problem here and hope you all can help me.
I doing a school project and non-sql user here therefore the solutions
provided should be as simple as possible.

Here the situation. In my database, I got a field called "Transmission" and
the records inside are either "Auto" or "Manual". If I want to query for
"Auto", I simply type this into the criteria box itself and vice versa.
However, what if I want to show "Auto" and "Manual" if the user click on
"Any" in the combo box I created in the form, what should I do it? As the
"Any" is not in the field of "Transmission in the first place

A quick reply is appreciated as approaching deadline for my project. Thanks!
 
D

Duane Hookom

Set the criteria to:
Forms!frmYourForm!cboAutoMan or Forms!frmYourForm!cboAutoMan = "Any"
 
L

Lord Kelvan

based on that i am presumming you are using somethign like [forms]!
[yourformname]![yourcomboboxname]

use this

Like IIf([forms]![yourformname]![yourcomboboxname]="any","*",[forms]!
[yourformname]![yourcomboboxname])

do make sure you reference you got this off google groups and did not
do the work yourself for your project.

Regards
Kelvan
 
S

Sianboy via AccessMonster.com

Ok sure thanks a lot I will take note of that. I posted a query qns and hope
yoy guys can help me out.

Lord said:
based on that i am presumming you are using somethign like [forms]!
[yourformname]![yourcomboboxname]

use this

Like IIf([forms]![yourformname]![yourcomboboxname]="any","*",[forms]!
[yourformname]![yourcomboboxname])

do make sure you reference you got this off google groups and did not
do the work yourself for your project.

Regards
Kelvan
 

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