View Single Post
  #4  
Old May 26th, 2004, 02:48 PM
Sabine Oebbecke
external usenet poster
 
Posts: n/a
Default Cry For Help! - Filling In Forms Automatically From Tables

Your tables are wrongly set up.

You need to have one table, which holds the order information, with
the following fields:

Order Table:
----------------
order id
product id
quantity

and one table for the product information with the following fields:

Product Table:
------------------

Product id
product name
unit price
units in stock
sale price
discount

Create a query from these two tables with:

+ order id, product id and quantity from the Order table,
+ then product name, unit price, units in stock, sale price and
discount from the Product table.

Use this query with all its fields as the basis for your form. Add the
fields to your form respectively change the control source for
existing fields to the query fields.
Whenever you now select a product from your combo box (which should
add its info into the 'product id' field), all other fields should
update accordingly.


"-elniniol999-" wrote in message ...
I am DESPERATE for a quick reply.. have exhausted my options...

i have a table called order details which contains:

order id
product id
product name
quantity
unit price
sale price
discount

and a products table containing:
Product id
product name
unit price
units in stock

I have a form which currently shows text boxes for
order id
product id
product name
quantity
unit price

(product id is a combo box)

i can choose the product id from the drop down i have created but it does
not put any other data into any of the other fields.. how on earth EXACTLY
can i manage to do this? i want the data from the product table to fill in
the form once i choose the product id from the form combo box

cheers for ANY help