changes to inventry control database template

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi all can someone please help,

i am using the above template. I have created a unit cost field in the
products table i just need to know how i can get access to automaticlly enter
this cost into the inventry transactions table when i select the product
required.

iam am sure it is quite simple to do but just can't see how i do it

ie: the product has a standard cost and wont change

many thanks in advanced

Dave
 
i am using the above template. I have created a unit cost field in
the products table i just need to know how i can get access to
automaticlly enter this cost into the inventry transactions table when
i select the product required.

The easiest way is to do something like this:

txtUnitCost = DLookup("UnitCost", "Products", _
"ProductID = """ & txtProductCode & """")

where txtUnitCost is the textbox control on your (inventry transactions)
form and txtProductCode is the textbox containing the productID you are
adding.

You would need to put this in a suitable event: either use the same event
that adds the product to the transaction (presumably some kind of
Button_Click), or before the transaction record is saved
(Form_BeforeUpdate), etc etc.

Hope that helps


Tim F
 
Back
Top