Linking Unit Price

J

Joe

I have an order entry database that I created. When
entering an order I need the unit price of the item to
bring up a default value from the products table AND I
need to be able to change the unit price for that
specific order and store it in the orders table (without
changing the products table). In the sample databases
that I have looked at it works this way, however I can
not get it to work in mine. I do not know what I am
missing. it has to be something in relationships or
tables. Any ideas?!
 
A

Allen Browne

1. Open the Northwind sample database.

2. Open the Orders Subform in design view.

3. Right-click the ProductID combo box, and choose Properties.

4. On the Event tab, choose After Update, and click the Build button (...).

Access opens the code window.
You can see how they build a filter string, and then use DLookup() to read
the UnitPrice field from the Products table.

For more help on DLookup(), see:
Getting a value from a table: DLookup()
at:
http://allenbrowne.com/casu-07.html
 

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