Only display a query's values in a listbox with the same name
In a table, named tblWorkDetails, I have two fields. The first field is named [WorkPerformed] and the second is [WorkDescription]. For [WorkPerformed] there are only three types: Adjustment, Mechanical, and Electrical. Below is an example table with real data.
[Work Performed] |
[Work Description] |
ADJUSTMENT |
Speed - Faster |
ADJUSTMENT |
Speed - Slower |
MECHANICAL |
Fabricate |
MECHANICAL |
Cut Metal |
ELECTRICAL |
Replace Fuse |
So, I created a query to consolidate the first field and the second field so it can be used in a listbox. Below is my query.
Code:
Work Type: [WorkedPerformed] & ": " & [WorkDescription]
Only the checkbox show is checked for this code. So when I run this code it displays the following:
ADJUSTMENT: Speed - Faster
ADJUSTMENT: Speed - Slower
MECHANICAL: Fabricate
MECHANICAL: Cut Metal
ELECTRICAL: Replace Fuse
On a form, I want to have three listboxes with a label that corresponds with each of the items in the worked performed. So I would have listboxes named ADJUSTMENT, MECHANICAL, and ELECTRICAL. Each box should only contain items that only corresponds to their name. So listbox that is named Electrical would only show items that pertain to Electrical. This would need to apply the other two listboxes.
It would seem to me that I would have to "unquery" the items that are in the listbox just so I can get the values only for that record that have the field name of the listbox.
Is what I am wanting to do, even possible. It may sound simple, but to me it is not. Any help would be greatly appreciated. Thank you.