Retrieving records form a table by picking from a combo box

nicktheblue

Registered User.
Local time
Today, 13:15
Joined
Sep 15, 2001
Messages
18
Many thanks to Carol & pcs for replying to my last post - problem solved! Now for my next question...
I have built my database using a similar model to 'Northwind'. I have around 160 records in my 'products' table, and in my order details form I would like to select one record from a combo box which would then automatically fill in the other fields in the form (you know the type of thing - unit cost etc.). I'm sure this has been covered in the forum Ad Infinitum, but please take pity on a desperate fool!

Many thanks in advance,

Nick
 
Thanks for your reply Pat,
still having problems though!
The combo box is called "ProductID", it has 4 rows, the fourth of which is "UnitCost", and I have created a new text box called "UnitCost1", so I have written an after update event procedure that looks like this-
Me.UnitCost1 = Me.ProductID(3)
I just get a Run Time error on selection - I am sure I am doing something stupid and would appreciate the offer of your superior knowledge!

Thanks again,

Nick
 
Try Me.UnitCost1 = ProductID.Column(3)

Not to barge in on Pat. I'm glad to have had his/her advice. By the way Pat, I purchased the Relational Databases for Mere Mortals. Still waiting on its arrival. Should make for improvements in all aspects of my database designs. Thanks again.
 

Users who are viewing this thread

Back
Top Bottom