Help with autocomplete

Appollo14

New member
Local time
Today, 13:02
Joined
Mar 17, 2001
Messages
5
The problem

I have a simple DB that i would like to perform a little automation with, however I cant seem to get my head around it.

I have a form to allow records to be kept for purchase orders.
The from has a subform on which the actual details of the items are kept.
This is the bit that I would like automated (in part!)

This sub form uses 2 tables, Products and Order Items. The products table is a simple table that holds stock details.

It has;
ProductId = Autonumber & Primary key
ProdCode = Text
ProdDesc = Text
UnitPrice = Currency

The OrderItems table holds the information relating to items on the orders (The order head being stored in another table);

This contains;
ItemId = Autonumber & Primary Key
ProductId = Foriegn key from product table
**ProdDesc = Text
**UnitPrice = Currency
Qty = Numeric
The items marked ** are the items that I would like to be filled in automatically when I select the ProductId

I hope that I have given enough information for you to help.

Many thanks
Noel.
 
On your subform create a combo box that includes ProductID, Desc and UnitPrice from the PRODUCTS TABLE.

Bind it to ProductID field on the form

On the after update event of the combo put...

ProdDesc=ComboNmae.Column(1) ' Second col
UnitPrice=ComboName.Column(2) ' Third Col

That should 'autofill' the fields on your form.

HTH

Kevin M
 
Kevin
You're a Diamond. I've been struggling with this for absolutely ages. I just wish that I had found this forum about 3 months ago when I first started this project, I'm sure that it would have saved me a lot of 'fumbling in the dark'.

Once again, many thanks.
Regards
Noel.
 

Users who are viewing this thread

Back
Top Bottom