Autofill Raws

  • Thread starter Thread starter iiimriii
  • Start date Start date
I

iiimriii

I have 2 tables in my database one is "Products" table and in this table
here are the fields

ProdcutID ProductName UnitPrice Catagory Profit Production time in
hours


and i have another table and it is "Order Details"

OrderDetailID OrderID ProductID UnitPrice Quantity Discount


In the Products table all information is entered there are all the
products and the prices are entered too...When I fill an order for a
customer I enter the Product ID an than I have to fill out the price in
Order Detail table too...I want the price to be automatically taken
from "Products" table when i enter the Product ID....

it must be easy but I don't know how to do it..in google i searched but
i am beginner I couldnt understand...

Thanks a lot in advance
 
You can create your form based on a query. First create a relation between
productid in both the tables. Generate a query by selecting
Orderdetails.Orderdetailid, Orderdetails.orderid,Orderdetails.productid,
Products.Productname, products.unitprice, orderdetails.unitprice,
orderdetails.quantity, orderdetails.quantitydiscount. Create a form based
on this query. In such a case, when you fill the productid, product name
and unit price will get automatically filled in.

Eechhutti R.Rajasekaran
(e-mail address removed)
 
Back
Top