changes to inventry control database template

D

daveyboy300

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
 
T

Tim Ferguson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top