Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Price Fields

Status
Not open for further replies.

jdaryl2003

Programmer
Dec 1, 2004
6
US


I have an invoicing program and I would like the invoiced item price updated based on the customer.

Here is my current setup. In my "customers" table I have a combo box with four selections, A, B, C, D. These are price codes and each customer is assigned one of the four.

In my "Items" table each item has four price fields. Price A, Price B, Price C, Price D.

In the "Orders Details" Table I have one price field. I would like that field populated with one of the four prices based on the customer. From my research I understand this may be accomplished by using a Module. Sorry to say but I have a limited knowledge of modules so any help would be greatly appreciated.
 
In the AfterUpdate event procedure of the Item control in the "Orders Detail" form:
Me![name of price control] = DLookUp("[Price " & Forms![name of mainform]![name of price code control] & "]", "Items", "[name of Items PK]='" & Me![name of Items PK control] & "'")

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top