how do I set up a price list in access?

L

Luz

I have a product description field, a unit price field and a quantity field.
I need to know how to set up a combo box so that when I select the product it
will populate the price for that product. I have created a calculated field
that once I enter the quantity for tha product I will have a total cost.
 
G

Gary Miller

Luz,

Do yourself a favor and add a ProductID field to both your
Product table (autonumber primary key)and your OrderDetail
tables (number, long integer) and store the ID of the
Product instead of the Description. This makes it much
easier to join the tables.

Let the toolbox wizard help you build the combobox with
three fields in it: ProductID, ProductDescription, Price.
Set the width of the ProductID column to be 0" and the
others as wide as needed. The 0" column will hide the ID and
display the other two.

In the AfterUpdate event click on the builder and then
choose code from the next list. Paste in the following in
the Sub it will create.

Me!Price = Me!cboProductLookup.Column(2)

The column fields are ordered 0,1,2 so that will give us the
price column and poke it in Price. Make sure to change the
field names to what you have.
 

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