P
Philip Martin
Hi,
I'm trying to modify the standard template Inventory Control. Basically I'm
setting up my own little business and this will do the job of ordering and
stock control, if I can get it to behave the way I want it to. I've already
UK'ised it and removed the fields and code I don't need, but am stuck on a
orders modification.
I've added the fields ProductDescription and UnitPrice to the Product table
and similarly added these fields to the Inventory Transactions table.
I've added the code:
Private Sub Product_AfterUpdate()
Me![UnitPrice] = Me![ProductID].Column(2)
Me![ProductDescription] = Me![ProductID].Column(3)
End Sub
to the Purchase Orders Subform, so that after using the Combo Box tied to
ProductID the UnitPrice field and the ProductDescription field are
automatically filled in. At least that is the plan! The Unit price field is
working fine but the other isn't. I've tried moving the fields in the table
around and also in the SQL lookup statement but just cant get it to work.
The fields from 0 to 2 will copy into the data but anything greater than
column 2 just wont work!!
Also, is there a way to modify the Combo box. At the moment it only shows
one selected field, the ProductName. Although there is a field for the
ProductDescription I would like to have this item displayed in the drop down
as well.
This may seem a bit cack handed, but the ProductName fields will be part
numbers for the items to be ordered while the ProductDescription will be a
text description and I need these both on the sub form and on the physical
order.
TIA,
Philip Martin.
I'm trying to modify the standard template Inventory Control. Basically I'm
setting up my own little business and this will do the job of ordering and
stock control, if I can get it to behave the way I want it to. I've already
UK'ised it and removed the fields and code I don't need, but am stuck on a
orders modification.
I've added the fields ProductDescription and UnitPrice to the Product table
and similarly added these fields to the Inventory Transactions table.
I've added the code:
Private Sub Product_AfterUpdate()
Me![UnitPrice] = Me![ProductID].Column(2)
Me![ProductDescription] = Me![ProductID].Column(3)
End Sub
to the Purchase Orders Subform, so that after using the Combo Box tied to
ProductID the UnitPrice field and the ProductDescription field are
automatically filled in. At least that is the plan! The Unit price field is
working fine but the other isn't. I've tried moving the fields in the table
around and also in the SQL lookup statement but just cant get it to work.
The fields from 0 to 2 will copy into the data but anything greater than
column 2 just wont work!!
Also, is there a way to modify the Combo box. At the moment it only shows
one selected field, the ProductName. Although there is a field for the
ProductDescription I would like to have this item displayed in the drop down
as well.
This may seem a bit cack handed, but the ProductName fields will be part
numbers for the items to be ordered while the ProductDescription will be a
text description and I need these both on the sub form and on the physical
order.
TIA,
Philip Martin.