Filling 2 fields with one query (combo box)

Pusher

BEOGRAD Put
Local time
Today, 13:01
Joined
May 25, 2011
Messages
230
Hi all,
I have a combo box that is populated by a query. The query is ID, NAME, TYPE and i only see NAME. Can I fill 2 fields of the corresponding table by selecting that combo box, the one with NAME and the other with TYPE automatically?
How can i access the other ,hidden, data of a combo box query?
Thanks
 
Howzit

In the after update event procedure of your combobox, put something like:

Code:
me.yourtypecontrol = me.yourcombobox.column(2)
 
Doesn't work...i put it in afterupdate event of the first combobox.

Code:
Me.ID_UREDJAJ = Me.ID_RASKRSNICE.Column(3)
The other control is also a combo box (it has predefined values). Do i need to set something up in this control or change the type of the control or what?
 
Howzit

You have 3 columns in your combobox, but the ordinal position starts at 0, so to reference your 3rd column it would be column(2) not 3
 
Howzit

If the second control is only going to be populated by the update event from the first combobox, then you can change it to a text box control
 
Yes, it will be a hidden control that automatically is filled by this event. So it must be a text box? I changed it from Column(3) - Column(2) still nothing...
 

Users who are viewing this thread

Back
Top Bottom