Set Focus based on user entry

SiGill

Registered User.
Local time
Today, 03:02
Joined
Dec 22, 2008
Messages
72
Apologies if this has been asked before, but I couldn't find anything.

I have a form with quite a few fields on it. What I want to do is have a ComboBox which holds a list of all the field names. I want the user to be able to pick a field from the list and the form sets focus to the field they have chosen.

I have my combobox but how can I write the On Click VBA to set focus to what the user picks?
 
assuming you have set your combo to fieldlist and all controls on your form have the same name as their controlsource then in the combo afterupdate event (not on click) put

me(comboboxname).setfocus

if you have put say 'txt' in front of the file name for the control name to differentiate it then use

me("txt" & comboboxname).setfocus
 
Thanks

After some playing about I just got that exact same solution.

Thank you
 

Users who are viewing this thread

Back
Top Bottom