Query Help

A

Andy Paris

I have two fields TITLE and SUB TITLE which are both COMBO in a form.

In the TITLE field i have this records. FURNITURE,STATIONERY ETC ETC

In the SUB TITLE field i have this records. CHAIRS,TABLES ETC ETC

I need to create one query that

if i choose as a title FURNITURE and sub title (leaves it empty), all
the furniture will be displayed

If i choose title FURNITURE and sub title CHAIRS, it will display all
CHAIRS that are under FURNITURE.

Any help pls????
thanks a lot
 
K

KARL DEWEY

Try setting the default on the subtitle combo to "*" and your criteria Like
[Forms]![YourForm]![YourCombo] so that if you do not select anything it will
pull all records.
 
A

Andy Paris

KARL said:
Try setting the default on the subtitle combo to "*" and your criteria Like
[Forms]![YourForm]![YourCombo] so that if you do not select anything it will
pull all records.


thanks for your help.. But i need exact match. I have 2 Combo Boxes as i
explained before.

In the TITLE criteria i have [Forms]![YourForm]![YourCombo1]
In the SUB TITLE criteria i have [Forms]![YourForm]![YourCombo2]

But the problem is here, if I select example FURNITURE in the TITLE and
i do not select anything in the SUBTITLE, no records is found.

It works if i select both.

Ant help pls?
Thanks again
 
K

KARL DEWEY

Re-read my post. Using the default of "*" for the subtitle and selecting
only title will give you exact match and you can select both title and
subtitle for exact match.
--
KARL DEWEY
Build a little - Test a little


Andy Paris said:
KARL said:
Try setting the default on the subtitle combo to "*" and your criteria Like
[Forms]![YourForm]![YourCombo] so that if you do not select anything it will
pull all records.


thanks for your help.. But i need exact match. I have 2 Combo Boxes as i
explained before.

In the TITLE criteria i have [Forms]![YourForm]![YourCombo1]
In the SUB TITLE criteria i have [Forms]![YourForm]![YourCombo2]

But the problem is here, if I select example FURNITURE in the TITLE and
i do not select anything in the SUBTITLE, no records is found.

It works if i select both.

Ant help pls?
Thanks again
 
A

Andy Paris

KARL said:
Re-read my post. Using the default of "*" for the subtitle and selecting
only title will give you exact match and you can select both title and
subtitle for exact match.


It works!!! I was doing a mistake from my side.

Thanks for your help
 

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