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!

Checkbox and Labels

Status
Not open for further replies.

Huey462

Technical User
Jun 30, 2010
18
US
I want to preface this with a disclaimer, I did search for a solution to this, but I am fairly new to designing access databases, so I really didn’t know what I was looking for…or may have stumbled across the answer without realizing it.

I have a self-inspection checklist with more than 500 entries. I would like to let the end user filter the items by using checkboxes. To be able to do this, I need to do 2 things (as far as I can see anyways)
1) How can I have a list of “blank/empty” labels be populated with the items from a database
2) How can I have MS Access apply a filter based on the checkboxes?

Checkbox column 1
Source Table: Shop Operation
Column : Category

Checkbox column 2
Source Table: ReviewStatus
Column : Status

This is the easiest way I can see to apply a filter, have the user pick what Categories he wants to review (i.e. check Tools, Section Supervisor, and Software) then what status he wants displayed (i.e. Open, Verified, Does Not Apply, etc)

Any help or guidance is greatly appreciated.
 

One solution would involve creating 2 combo boxes listing the categories (combo box 1) and status (combo box 2).
Your query would then filter based on these selections.
For example:
Code:
SELECT * FROM tblShopOperation S
INNER JOIN tblReviewStatus R ON S.SomeID = R.SomeID
WHERE Category = Forms!YourForm.cboCategory
AND Status = Forms!YourForm.cboStatus

Randy
 
I had thought of doing that, and may implement it in the meantime, but wanted to be able to select multiple criteria to filter the records that will be displayed by.
 

but wanted to be able to select multiple criteria to filter the records

WHERE Category = ...
AND Status = ...

is not multiple criteria?


Randy
 
I should have explained further.
I want the end user to be able to select multiple categories and statuses at the same time.
i.e.

Category
[x] Tools
[ ] Section Supervisor
[x] Software

Status
[x] Open
[x] Verified
[ ] Does Not Apply

When the user clicks "Submit" all records with either Tools or Software as a category who's status is either Open or Verified will be displayed.
 

In that case, you'll probably need to use a multi-select list box. I have never had the need for one, so cannot adequately help you with the code, although it should be similar to what I've all ready provided.


Randy
 
I will look into that. Thank you for the feedback =D
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top