me.field = me.combobox.column()

rodrigoturbina

Registered User.
Local time
Today, 15:45
Joined
Jul 30, 2014
Messages
29
Hi, when I attempt to use the me.field = me.combobox.column() method to retrieve info from another query,it only works if I use column 0 or 1... it doesn´t work with higher columns number.

- field name: cbofi
- row source: listado-unico-fi <-- it is a query with unique values and 7 fields in total
- event procedure, change:

Private Sub cbofi_Change()
Me.txtDOCTPT = Me.cboFI.Column(1)
Me.campovia = Me.cboFI.Column(5)
End Sub

- txtDOCTPT is the field that indeed works
- campovia is the one that does not work

I tried using column(0) and column(1) and it worked fine... but higher column numbers do not work. Just mentioning because the field names are all right.

Could you please help me?
Thanks so much, regards
 
Does your combobox have 6 columns in it?
 
It only displays one, but the row source points to a query which has 6 fields.

It is my understanding that I don´t need to display the whole 7 columns of the query in the combobox... that I can just display one, and reference the other values, such as I did with the "column(1)" reference, which is the second column of the query...
Regards.
 
Yes hidden columns should be fetchable...
As long as you are fetching the 7 columns into the combobox and not only the two you need.

Couldnt really tell you what is wrong without seeing the form/database itself :(
 

Users who are viewing this thread

Back
Top Bottom