P
PeteC
Hi,
I have a problem with data in a subform which I'm using to resolve a
many-many relationship.
The system has a table called 'Products', containing the following fields
(amongst others)
ProductID (Number, Primary key)
Product Name (Text)
The second table is called 'OpPack' (Operator Packs)
OpPackID (Number, Primary key)
Description (Text)
Each OpPack is made up of several Products, and the same product can be
present in none, one or more OpPacks. To resolve this, I have a resolution
table called OpPackItem
OpPackID (Number, Primary Key)
ProductID (Number, Primary Key)
Quantity (Number - default 1, shows how many of each product is in this
line)
The table OpPackItem is set up with Lookups on both OpPackID and ProductID,
so that instead of seeing the number, you see the Description (from OpPack,
using OpPackID) or the Product Name (from Products, using ProductID)
So, for example, an OpPack of 'Retailer Request' may contain the products
'Counter Top Display' and 'Consumer leaflets' ( with quantity 100)
To construct the Op Packs, I created a form based on the table 'OpPack'.
Within this form I created (using the form wizard) a subform for OpPackItem,
which would have two columns - ProductID, and Quantity.
Now the bit that's not working.
When I look at the subform for the OpPackItem, it shows me the correct
contents of the OpPackItem table, but it's showing me the ProductID *NUMBER*
rather than the text of the 'Product Name'. It is a drop-down list, and when
I drop that list, it does show me the 'Product Names', but when I select one
it puts the Product ID in the field.
I need to see in this subform the Product Name for this form to work.
The row source for the subform is
SELECT Products.ProductID, Products.ProductName FROM Products;
The column count is 2, the column widths are 0;3cm, and the bound column is
1.
Any ideads on why this isn't working? If you need more information, please
let me know. If you would recommend going about it another way, I'm open to
that as well.
Regards,
Pete.
I have a problem with data in a subform which I'm using to resolve a
many-many relationship.
The system has a table called 'Products', containing the following fields
(amongst others)
ProductID (Number, Primary key)
Product Name (Text)
The second table is called 'OpPack' (Operator Packs)
OpPackID (Number, Primary key)
Description (Text)
Each OpPack is made up of several Products, and the same product can be
present in none, one or more OpPacks. To resolve this, I have a resolution
table called OpPackItem
OpPackID (Number, Primary Key)
ProductID (Number, Primary Key)
Quantity (Number - default 1, shows how many of each product is in this
line)
The table OpPackItem is set up with Lookups on both OpPackID and ProductID,
so that instead of seeing the number, you see the Description (from OpPack,
using OpPackID) or the Product Name (from Products, using ProductID)
So, for example, an OpPack of 'Retailer Request' may contain the products
'Counter Top Display' and 'Consumer leaflets' ( with quantity 100)
To construct the Op Packs, I created a form based on the table 'OpPack'.
Within this form I created (using the form wizard) a subform for OpPackItem,
which would have two columns - ProductID, and Quantity.
Now the bit that's not working.
When I look at the subform for the OpPackItem, it shows me the correct
contents of the OpPackItem table, but it's showing me the ProductID *NUMBER*
rather than the text of the 'Product Name'. It is a drop-down list, and when
I drop that list, it does show me the 'Product Names', but when I select one
it puts the Product ID in the field.
I need to see in this subform the Product Name for this form to work.
The row source for the subform is
SELECT Products.ProductID, Products.ProductName FROM Products;
The column count is 2, the column widths are 0;3cm, and the bound column is
1.
Any ideads on why this isn't working? If you need more information, please
let me know. If you would recommend going about it another way, I'm open to
that as well.
Regards,
Pete.