spectraflame
Well-known Member
- Joined
- Dec 18, 2002
- Messages
- 830
- Office Version
- 365
- Platform
- Windows
I have a combo box that list the different departments (WTOType). Based on the users selection, a query is run to refresh another combo box (Project#). The Project# box gets its data from a table that has project number and department. This works really well right now. However I would like to modify the expression to allow all of the project numbers to appear when a specific department is selected, but still limit the project numbers to the rest of the departments.
EX.
When the Electric department is selected, I currently only see the Electric Project#'s. This is the same for the rest of the departments.
However, when the department = Maintenance, the project field is blank because there are no specific project numbers defined for maintenance. The maintenance department would have the ability to assist with any project.
I am just not sure how to create the expression. I was thinking something like:
IF WOType = "Maintenance" return all project numbers in the project number table, but if the department does not = "Maintenance" run the query based on the selected department.
I have not quite figured out all of the code stuff yet.
Thanks,
Matthew
EX.
When the Electric department is selected, I currently only see the Electric Project#'s. This is the same for the rest of the departments.
However, when the department = Maintenance, the project field is blank because there are no specific project numbers defined for maintenance. The maintenance department would have the ability to assist with any project.
I am just not sure how to create the expression. I was thinking something like:
IF WOType = "Maintenance" return all project numbers in the project number table, but if the department does not = "Maintenance" run the query based on the selected department.
I have not quite figured out all of the code stuff yet.
Thanks,
Matthew