combo box return value to more than one field

  • Thread starter Thread starter Russ Lamb
  • Start date Start date
R

Russ Lamb

I have form "Orders" with fields "productID" and "price". "productID" can be
selected from a combo box that displays "ID","desc", "price". When selected
it returns the "ID" to the "productID" field and the price is manually
entered into the "price" field. Is there a way to get the "price" field to
enter automatically when the ID is selected in "productID" field?

The ID never changes but the price does twice a month. It is a bound form in
an Access '03 .mdb. I am a newbie to vb but intermediate to Access. The
display information in the combo box comes straight from one table. Do I
need to split table? use macro? What are my options and/or best approach?

Thanks in advance, Russ
 
Russ Lamb said:
I have form "Orders" with fields "productID" and "price". "productID" can be
selected from a combo box that displays "ID","desc", "price". When selected
it returns the "ID" to the "productID" field and the price is manually
entered into the "price" field. Is there a way to get the "price" field to
enter automatically when the ID is selected in "productID" field?

The ID never changes but the price does twice a month. It is a bound form in
an Access '03 .mdb. I am a newbie to vb but intermediate to Access. The
display information in the combo box comes straight from one table. Do I
need to split table? use macro? What are my options and/or best approach?

In the AfterUpdate event of the ComboBox...

Me![price] = Me![ComboBoxName].Column(2)

Column numbers are zero-based so Column(2) is actually the third column.
 
Rick thank you for your help. I will try it immediately and let you know.
Thanks, Russ

Rick Brandt said:
Russ Lamb said:
I have form "Orders" with fields "productID" and "price". "productID" can be
selected from a combo box that displays "ID","desc", "price". When selected
it returns the "ID" to the "productID" field and the price is manually
entered into the "price" field. Is there a way to get the "price" field to
enter automatically when the ID is selected in "productID" field?

The ID never changes but the price does twice a month. It is a bound form in
an Access '03 .mdb. I am a newbie to vb but intermediate to Access. The
display information in the combo box comes straight from one table. Do I
need to split table? use macro? What are my options and/or best
approach?

In the AfterUpdate event of the ComboBox...

Me![price] = Me![ComboBoxName].Column(2)

Column numbers are zero-based so Column(2) is actually the third column.
 
Back
Top