Textbox showing ID instead of value (1 Viewer)

David Ball

Registered User.
Local time
Today, 14:27
Joined
Aug 9, 2010
Messages
230
Hi,

I have a Form where I can select car characteristics such as Make and Model from Comboboxes to create a record for a particular vehicle. This works fine.
I also want to show the Make at the top of the form in a Textbox, however, rather than showing Ford, for example, it shows the ID number instead.
How can I get the Textbox to show the Make of the vehicle instead of the ID associated with that make?

Thanks very much
Dave
 

GinaWhipp

AWF VIP
Local time
Today, 00:57
Joined
Jun 21, 2011
Messages
5,899
If you are pulling the Make from the Combo Box...

Code:
=[YourComboBoxName].[Column](1)

(1) being the second column of your Combo Box and the column that has the Make in it. If not change the number accordingly.

EDIT: Oops, forgot to tell you to place the above on the Control Source of the Text Box.
 
Last edited:

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 12:57
Joined
May 7, 2009
Messages
19,246
use the Current of your form and AfterUpdate event of the combo:

private sub form_current()
me.unboundtext=combo.column(1)
end sub

private sub combo_afterupdate()
call form_current
end sub
 

Users who are viewing this thread

Top Bottom