single column lookup with multile column return

R

Roger Ryall

This is probabaly a simple thing but here goes. I have a 3 column table (ie.
ID, Product, Price. I am using a form with a look up (combo box) on product.
Once the product is selected how can i get to return the corresponding price
into another box on the form?
Thanks
 
R

ruralguy via AccessMonster.com

Unless there is an historical reason for having the price in more then one
table, you should really use a join to display the price. Having said that,
there is a Column() property of a ComboBox that you can access in the
AfterUpdate event of the cbo to set the other control.
It is zero based so: Me.ComboBoxName.Column(1) is the 2nd column.
 
R

Roger Ryall

Not sure i understand. I have only one table that i need to pull from so not
sure how joinning would help. The purpose is to automatically show a price on
a form based on picking the product from a drop down then adding the prices
together at bottum.
I dont have any VB experiance but very strong access 03/07 experiance
thx
 
R

ruralguy via AccessMonster.com

So your form is not bound to a query/table? Then use the sample code I
supplied in the previous post in the AfterUpdate event of the ComboBox.
Using your ComboBox name of course.

Roger said:
Not sure i understand. I have only one table that i need to pull from so not
sure how joinning would help. The purpose is to automatically show a price on
a form based on picking the product from a drop down then adding the prices
together at bottum.
I dont have any VB experiance but very strong access 03/07 experiance
thx
Unless there is an historical reason for having the price in more then one
table, you should really use a join to display the price. Having said that,
[quoted text clipped - 7 lines]
 
Top