reference to lookup value

G

Guest

I'm trying to write an expression that refers to a value in a combobox on a
form that is derived from a lookup field on a table that (of course) refers
to values on another table. How can I properly reference this? Messing
around with the bound column properties for the combo box and the underlying
table has not helped. The only values I can get passed through to the VBA
editor are the index value and null.
 
G

Guest

If the RowSource of the combo include few fields

Select Field1 , Field2 , Field3 From TableName

To get the value from the combo
Field1:
Forms![FormName]![ComboName].Column(0)

Field2:
Forms![FormName]![ComboName].Column(1)

Field3:
Forms![FormName]![ComboName].Column(2)

Note: The column number start with 0,
If the column count on the combo property is less then 3, then the third
column in the combo wont be recognize
 
G

Guest

Sorry. I forgot to let you know that this was a big help!
--
Why are you asking me? I dont know what Im doing!

Jaybird


Ofer Cohen said:
If the RowSource of the combo include few fields

Select Field1 , Field2 , Field3 From TableName

To get the value from the combo
Field1:
Forms![FormName]![ComboName].Column(0)

Field2:
Forms![FormName]![ComboName].Column(1)

Field3:
Forms![FormName]![ComboName].Column(2)

Note: The column number start with 0,
If the column count on the combo property is less then 3, then the third
column in the combo wont be recognize

--
Good Luck
BS"D


Jaybird said:
I'm trying to write an expression that refers to a value in a combobox on a
form that is derived from a lookup field on a table that (of course) refers
to values on another table. How can I properly reference this? Messing
around with the bound column properties for the combo box and the underlying
table has not helped. The only values I can get passed through to the VBA
editor are the index value and null.
 
I

i_takeuti

Jaybird said:
Sorry. I forgot to let you know that this was a big help!
--
Why are you asking me? I dont know what Im doing!

Jaybird


Ofer Cohen said:
If the RowSource of the combo include few fields

Select Field1 , Field2 , Field3 From TableName

To get the value from the combo
Field1:
Forms![FormName]![ComboName].Column(0)

Field2:
Forms![FormName]![ComboName].Column(1)

Field3:
Forms![FormName]![ComboName].Column(2)

Note: The column number start with 0,
If the column count on the combo property is less then 3, then the third
column in the combo wont be recognize

--
Good Luck
BS"D


Jaybird said:
I'm trying to write an expression that refers to a value in a combobox
on a
form that is derived from a lookup field on a table that (of course)
refers
to values on another table. How can I properly reference this?
Messing
around with the bound column properties for the combo box and the
underlying
table has not helped. The only values I can get passed through to the
VBA
editor are the index value and null.
 

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