Greetings,
I really hope someone can help me with creating combo boxes based on the previous combo box choice. I have have managed to get combo box 2 to be based on combo box 1 but for some reason combo box 3 will not populate with anything. I have added the afterupdate to combo box 2 and placed the SELECT statement to include the previous form! info. I have scoured the web and spent hours trying to fix this. Please help. thanks!
Table Info (check pictures for more info):
Supplier: ID, Company, POC, Email, ETC
Products: Product ID, Supplier, Product Code, Product Name, Description
Combo Box 1:
Name: Supplier
Column Count: 2
Column Width: 0";1"
Row source Type: Table/Query
Row Source: SELECT [ID], [Company] FROM Suppliers ORDER BY [Company];
Event:
Private Sub Supplier_AfterUpdate()
Me.Product_Code = Null
Me.Product_Code.Requery
Me.Product_Code = Me.Product_Code.ItemData(0)
End Sub
Combo Box 2:
Name: Product Code
Column Count: 2
Column Width: 0";1"
Row source Type: Table/Query
Row Source: SELECT Products.[Product ID], Products.[Product Code] FROM Products INNER JOIN Suppliers ON Products.Supplier=Suppliers.ID WHERE (((Suppliers.ID)=[Forms]![Inventory Details]![Supplier])) ORDER BY Products.[Product Code];
Event:
Private Sub Product_Code_AfterUpdate()
Me.ProductName = Null
Me.ProductName.Requery
Me.ProductName = Me.ProductName.ItemData(1)
End Sub
Combo Box 3:
Name: ProductName
Column Count: 2
Column Width: 0";1"
Row source Type: Table/Query
Row Source: SELECT Products.[Product ID], Products.[Product Name], Products.[Product Code] FROM Products WHERE (((Products.[Product Code])=[Forms]![Inventory Details]![Product Code])) ORDER BY Products.[Product Name];
Event:
NOTHING
I hope this helps!!! If not , I have a link to my actual database. I have no idea why its 9MB with very few records (too large to upload here) .
www DOT mediafire DOT com/?n47wzpwj5cu5e79
I really hope someone can help me with creating combo boxes based on the previous combo box choice. I have have managed to get combo box 2 to be based on combo box 1 but for some reason combo box 3 will not populate with anything. I have added the afterupdate to combo box 2 and placed the SELECT statement to include the previous form! info. I have scoured the web and spent hours trying to fix this. Please help. thanks!
Table Info (check pictures for more info):
Supplier: ID, Company, POC, Email, ETC
Products: Product ID, Supplier, Product Code, Product Name, Description
Combo Box 1:
Name: Supplier
Column Count: 2
Column Width: 0";1"
Row source Type: Table/Query
Row Source: SELECT [ID], [Company] FROM Suppliers ORDER BY [Company];
Event:
Private Sub Supplier_AfterUpdate()
Me.Product_Code = Null
Me.Product_Code.Requery
Me.Product_Code = Me.Product_Code.ItemData(0)
End Sub
Combo Box 2:
Name: Product Code
Column Count: 2
Column Width: 0";1"
Row source Type: Table/Query
Row Source: SELECT Products.[Product ID], Products.[Product Code] FROM Products INNER JOIN Suppliers ON Products.Supplier=Suppliers.ID WHERE (((Suppliers.ID)=[Forms]![Inventory Details]![Supplier])) ORDER BY Products.[Product Code];
Event:
Private Sub Product_Code_AfterUpdate()
Me.ProductName = Null
Me.ProductName.Requery
Me.ProductName = Me.ProductName.ItemData(1)
End Sub
Combo Box 3:
Name: ProductName
Column Count: 2
Column Width: 0";1"
Row source Type: Table/Query
Row Source: SELECT Products.[Product ID], Products.[Product Name], Products.[Product Code] FROM Products WHERE (((Products.[Product Code])=[Forms]![Inventory Details]![Product Code])) ORDER BY Products.[Product Name];
Event:
NOTHING
I hope this helps!!! If not , I have a link to my actual database. I have no idea why its 9MB with very few records (too large to upload here) .
www DOT mediafire DOT com/?n47wzpwj5cu5e79