Trying to adapt a template for my use

JustMargie

JustMargie
Local time
Today, 14:41
Joined
Oct 26, 2010
Messages
4
I downloaded a template which (with a few minor changes works well for our needs). Should I mention that I am not a programmer or database builder or is that glaringly obvious from my first sentence?

I have a sub-form "Order Details Sub-Form" which works beautifully with a macro that auto-fills the Product Name from a drop-down list of products from the Products table and then Unit Price is automatically filled with the selection of a product. I would like BOTH fields (Product Name and ProductID to go to the table when a form is completed PLUS I would also like the DLookUp function that is tied to the Product ID which automatically fills in the unit price field to ALSO auto-fill the Vendor Name and Vendor Id from the same table.

My table "Products" contains all the necessary fields - ProductID (primary key), Product Name, VendorID, (related to the tables "Vendors" which contains detail re: Vendors) Vendor Name etc..

The DLookUp Macro on the sub-form looks like this:

NAME: Set UnitPrice:After Update
ACTION: SetValue
ARGUEMENTS: [UnitPrice], DLookUp("UnitPrice","Products","ProductID = " & [ProductID])

Is there a way to add VendorID and Vendor Name to this macro? lol, I'm certain there IS a way. Let me rephrase... please kindly suggest a way to do this.
 

Users who are viewing this thread

Back
Top Bottom