Okay, Access 2003, XP
First, I have a simple 2 column table named "Products". Column 1, "Product_Name", has, you guessed it....a list of Product Names. Column 2, "Employee" has the Employees name that handles that product.
Okay, so, on my form I have 2 Combo Boxes. Box 1 "Product Combo", uses Column 1 of the "Products" table to generate the list of values. No problem.
Box 2, "AssignedToCombo", should show the name of the employee that handles that product.
In the "ProductCombo" On Change event I have the following code:
Private Sub ProductCombo_Change()
If Me![ProductCombo] = "Unassigned" Then
Me![AssignedToCombo] = "Unassigned"
Else
Me![AssignedToCombo].RowSource = "Select [Employee] From [Products] WHERE Product_Name = '" & Me![ProductCombo] & "'"
End If
End Sub
What happens, is when I select a Product from the "ProductCombo" then the only option available in the "AssignedToCombo" Drop down is the employees name that handles that product. Which means the code is doing what it should........sort of.
The Problems:
1. When I open the form, or move to a new record, both of the Combo Boxes are blank....everything is available from the drop down, but initially they are blank. They both have a default value of "Unassigned" (which is also in the list for both columns), but they just show blank boxes until you select something. I want them to actually SHOW "Unassigned" in both boxes until another selection is made.
2. Related to 1. (I think), when a product is selected in "ProductCombo", I want that employees name to auto-fill(?) into the "AssignedToCombo". Currently, it is the only available option from the drop-down, but I don't want users to have to click and select both.
3. And this one I have no idea where to start with....Once problems 1 and 2 are resolved....The employees name should automatically pop up in the "AssignedToCombo", but then I want the rest of the list of employees to be available on the drop-down. Occasionally, work gets handed off to another employee, even though it's not technically "their product", so there has to be an option to do that.
I hope that all made sense, and I apologize for the length...but I'd rather the issues be clear! Thank you for ANY help anyone can provide!
First, I have a simple 2 column table named "Products". Column 1, "Product_Name", has, you guessed it....a list of Product Names. Column 2, "Employee" has the Employees name that handles that product.
Okay, so, on my form I have 2 Combo Boxes. Box 1 "Product Combo", uses Column 1 of the "Products" table to generate the list of values. No problem.
Box 2, "AssignedToCombo", should show the name of the employee that handles that product.
In the "ProductCombo" On Change event I have the following code:
Private Sub ProductCombo_Change()
If Me![ProductCombo] = "Unassigned" Then
Me![AssignedToCombo] = "Unassigned"
Else
Me![AssignedToCombo].RowSource = "Select [Employee] From [Products] WHERE Product_Name = '" & Me![ProductCombo] & "'"
End If
End Sub
What happens, is when I select a Product from the "ProductCombo" then the only option available in the "AssignedToCombo" Drop down is the employees name that handles that product. Which means the code is doing what it should........sort of.
The Problems:
1. When I open the form, or move to a new record, both of the Combo Boxes are blank....everything is available from the drop down, but initially they are blank. They both have a default value of "Unassigned" (which is also in the list for both columns), but they just show blank boxes until you select something. I want them to actually SHOW "Unassigned" in both boxes until another selection is made.
2. Related to 1. (I think), when a product is selected in "ProductCombo", I want that employees name to auto-fill(?) into the "AssignedToCombo". Currently, it is the only available option from the drop-down, but I don't want users to have to click and select both.
3. And this one I have no idea where to start with....Once problems 1 and 2 are resolved....The employees name should automatically pop up in the "AssignedToCombo", but then I want the rest of the list of employees to be available on the drop-down. Occasionally, work gets handed off to another employee, even though it's not technically "their product", so there has to be an option to do that.
I hope that all made sense, and I apologize for the length...but I'd rather the issues be clear! Thank you for ANY help anyone can provide!