Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query trouble

Status
Not open for further replies.

Chyld

Programmer
Jul 25, 2001
48
GB
I am having trouble with a combo box problem...

I have a table as follows called 'Product_Allowances'

ProductName Allow_Flag Allow_Brick Allow_Stone

Saxon x
Walling x
Natural Stone x
Natural Walling x x

Where there is an 'x' it is a tick on a check box.

what I want to do is set up a query where the field names where the record value is true. i.e.

If I choose Saxon from the list via a list box, then in another list box, the 'Allow_Flag' will appear.

If I chose Natural Walling, then in the next list box, the fields Allow_Brick and Allow_Stone would appear. The column where the value is false wouldn't appear.

How do I do this?
 
You can do a double query, the inner querry will check to see what is checked and the outer query will return that value and display that...get it??
For instance, the inner querry will check if Natural Walling is checked and if it is then Allow_Brick and Allow_Stone will display and any false value won't... I have not failed; I merely found 100,000 different ways of not succeding...
 
Thanks for that, although I understand what you mean with regards to the query, I don't know the terms inner and outer queries.

Please explain how I would run this query.........
 
Hi, sorry for the delay on posting back, but i've been a little busy with work and all...INNER querries simply means subquerries...
something like this:


(select Allow_Flag, Allow_Brick, Allow_Stone
from myTable
where ProductName = Allow_Brick
AND ProductName = Allow_Stone

(select ProductName
from myTable
where ProductName = Natural_Walling)
)

Know what I mean?? The inner querry (the onle in red}will check to see 'Natural_Walling' is selected and if it is then the outer querry (the one in green) will display the proper fields...
I have not failed; I merely found 100,000 different ways of not succeding...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top