accvbalearner
Registered User.
- Local time
- Today, 14:57
- Joined
- Jan 3, 2013
- Messages
- 42
Hi All, I need a little bit of help on a form that I am working on.
I have attached a sample database so that you can see the code that I am using or trying to use anyway.
Here is what I am trying to do:
I have a form with a subform in it. What I am trying to do is filter the subform based on the selection in two combo boxes on the main form, the code I am using is building an SQL Statement to run against the table to filter the subform, or it's supposed to anyway. This code is working fine in another database where I am able to select multiple items in each of seven separate list boxes, after each selection the subform is filtered.
The problem that I have in the attached database is that it doesn't select any data after updating one or both of the combo boxes. The subform is blank, but it shouldn't be.
Here is what I need to happen.....
Thanks in advance for help that you can provide!
I have attached a sample database so that you can see the code that I am using or trying to use anyway.
Here is what I am trying to do:
I have a form with a subform in it. What I am trying to do is filter the subform based on the selection in two combo boxes on the main form, the code I am using is building an SQL Statement to run against the table to filter the subform, or it's supposed to anyway. This code is working fine in another database where I am able to select multiple items in each of seven separate list boxes, after each selection the subform is filtered.
The problem that I have in the attached database is that it doesn't select any data after updating one or both of the combo boxes. The subform is blank, but it shouldn't be.
Here is what I need to happen.....
- When the user selects Facility TEST, then the subform should show all items in C01-CodeDict that have a PlantCode = 'TEST'.
- If the user also selects a CodeType of System, then the subform should show all TEST Facilities with a CodeType of System.
- If the User only selects a CodeType of System, then the subform should show all items in C01-CodeDict that have a CodeType = 'System'
- If no selections are made, the subform should be blank.
Thanks in advance for help that you can provide!
Attachments
Last edited: