davidd31415
Programmer
I have a database with the following tables:
MainTable
Products
Packaging
The MainTable and Products table are both related to the Packaging table to display the "Package Type" field.
The MainTable is related to the Products table to select a list of various products. I would like the list presented in the drop-down lookup to be limited by the Package Type that first needs to be selected in the MainTable.
After running the lookup wizard for the Product field in the MainTable, the Row Source was:
SELECT Products.[Product ID], Products.[Product Name] FROM Products;
I changed this SQL statement to:
SELECT Products.[Product ID], Products.[Product Name] FROM Products WHERE Products.[Packaging] = LU_Packaging;
If I use MainTable.LU_Packaging or some other value at the end of the statement, a dialog pops up when I open the table asking for the value so I am assuming LU_Packaging contains the correct value.
However, the lookup drop-down has no items in it even when the packaging fields are all the same...
Am I doing something wrong here? Is there a way to do what I am trying to do ?
Also, I'm wondering about my general approach here; in most cases do the forms modify several tables simultaneously (rather than having a "MainTable" like I do here)?
THanks,
Dave
MainTable
Products
Packaging
The MainTable and Products table are both related to the Packaging table to display the "Package Type" field.
The MainTable is related to the Products table to select a list of various products. I would like the list presented in the drop-down lookup to be limited by the Package Type that first needs to be selected in the MainTable.
After running the lookup wizard for the Product field in the MainTable, the Row Source was:
SELECT Products.[Product ID], Products.[Product Name] FROM Products;
I changed this SQL statement to:
SELECT Products.[Product ID], Products.[Product Name] FROM Products WHERE Products.[Packaging] = LU_Packaging;
If I use MainTable.LU_Packaging or some other value at the end of the statement, a dialog pops up when I open the table asking for the value so I am assuming LU_Packaging contains the correct value.
However, the lookup drop-down has no items in it even when the packaging fields are all the same...
Am I doing something wrong here? Is there a way to do what I am trying to do ?
Also, I'm wondering about my general approach here; in most cases do the forms modify several tables simultaneously (rather than having a "MainTable" like I do here)?
THanks,
Dave