swap values

Hibba

Registered User.
Local time
Today, 03:45
Joined
Jan 6, 2005
Messages
23
How can I change the value of a combo box on exit. I want it to switch from ID to Name. This we I can input id (faster) and it can then show be name.

Also, I would need to be able to choose Ids from the drop down as well, for future changes
 
I would use the After Update event to change the value of the unbound combo box then update the table/query field and the combo with the ID. I assume that you want to store the ID... With the On Current form event I would populate the unbound controls.

You can display in the combo's drop down the ID and the Name.
 
Hmm...not really. I want the Name to be the value in the table. Basically, if the form is not filled out, you choose the ID, if it has an ID, I want to see the Name. Since I see the Name, there is already a value for that field, but to change it I would want the drop down of ID.

Get it?
 
Hibba said:
How can I change the value of a combo box on exit. I want it to switch from ID to Name. This we I can input id (faster) and it can then show be name.

If you expect it to be bound then you can't. Why not just let them pick from the combo?
 
Also, in the VB, how mighht I "change the value of the unbound combo box"

I need a good reference for syntx in this stuff...
 
I would use the following syntax:

If the ComboBox is on the form where the Event occurs:

ME.[ControlName] = value you want to add(ie. field name)

else :)

Forms![MainForm]!([SubForm].Form*)![ControlName]= value

*If subform exist.
 

Users who are viewing this thread

Back
Top Bottom