combo box bound column

G

Guest

Hi
i have a simple form comes from a table which describe some travelling
elements...
travelling id---date---course---distance...
the --course--(combobox) "row source" comes from a query with predifined
routes and distances with "column count=2" and "bound column
=1"...(---course---distace---)query.
i would like to ask if its possible every time i select a value from the
--course-- combo, (athens-vienna for example) , i could take the
corresponding value in the --distance-- automaticaly ...
Thanks
 
F

fredg

Hi
i have a simple form comes from a table which describe some travelling
elements...
travelling id---date---course---distance...
the --course--(combobox) "row source" comes from a query with predifined
routes and distances with "column count=2" and "bound column
=1"...(---course---distace---)query.
i would like to ask if its possible every time i select a value from the
--course-- combo, (athens-vienna for example) , i could take the
corresponding value in the --distance-- automaticaly ...
Thanks

Use an Unbound text control on the form.
Set it's control source to:
=ComboName.Column(1)
where 1 is the number of the column.
Since Combo Boxes are zero based, 1 is actually the 2nd column.

Alternatively, leave the unbound text control blank.
Code the Combo Box AfterUpdate event:
Me![TextControlName] = Me![ComboName].Column(1)
 
G

Guest

Thanks!!!

fredg said:
Hi
i have a simple form comes from a table which describe some travelling
elements...
travelling id---date---course---distance...
the --course--(combobox) "row source" comes from a query with predifined
routes and distances with "column count=2" and "bound column
=1"...(---course---distace---)query.
i would like to ask if its possible every time i select a value from the
--course-- combo, (athens-vienna for example) , i could take the
corresponding value in the --distance-- automaticaly ...
Thanks

Use an Unbound text control on the form.
Set it's control source to:
=ComboName.Column(1)
where 1 is the number of the column.
Since Combo Boxes are zero based, 1 is actually the 2nd column.

Alternatively, leave the unbound text control blank.
Code the Combo Box AfterUpdate event:
Me![TextControlName] = Me![ComboName].Column(1)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top