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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filtering Records

Status
Not open for further replies.
Oct 28, 2003
50
MY
Hi,
I'm new in Access. hope can help me.
I've created one table contains:

ID Description DivENG DivSRD DivSBD DivIPD
-----------------------------------------------------------
1 description 1 _/
2 description 2 _/ _/
3 description 3 _/
4 description 4 _/ _/
5 description 5 _/
-----------------------------------------------------------

I want to filter records from DivENG and DivSBD = true

TQ in advanced.
 
[tt]
Hi:

SELECT ID, Description, DivENG, DivSRD, DivSBD, DivIPD
FROM tblDivisions
WHERE ((DivENG)=True) AND ((DivSBD))=True


But this won't show you any records from the data indicated. There are no records with DivENG and DivSBD = True. On the other hand,

SELECT ID, Description, DivENG, DivSRD, DivSBD, DivIPD
FROM tblDivisions
WHERE ((DivENG)=True) AND ((DivIPD))=True


Will select record 4.

SELECT ID, Description, DivENG, DivSRD, DivSBD, DivIPD
FROM tblDivisions
WHERE ((DivENG)=True) OR ((DivSBD))=True


Will select records 2, 3 and 4.

I think.

Copy and paste one of the above into the SQL view of a new query. Then substitute the correct name for your table. Save the query. Or use the SQL statement as a Row Source in a combo box, etc.

Cheers,


[glasses][tt]Gus Brunston - Access2000(DAO)
Skill level based on 1-10: 7
Webmaster: www.rentdex.com[/tt]
 
[tt]
You could put this in Data->Filter of a form's property sheet:

((YourTable.DivENG=True)) and ((YourTable.DivSBD=True))


[glasses][tt]Gus Brunston - Access2000(DAO)
Skill level based on 1-10: 7
Webmaster: www.rentdex.com[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top