combo lookup focus

teiben

Registered User.
Local time
Today, 19:12
Joined
Jun 20, 2002
Messages
462
I have a combobox on a form that looks up info, which works fine, but if the user hits tab, instead of going to the next field the information disappears from the combobox...thinking if i put some code in OnLostFocus and move it to the next field that would fix my problem,....does this sound like a fix?

also what syntax do I used, i've tried

DoCmd.GoToControl txtQuestion1 and I'm receiving type mismatch errors, any idea
 
also what syntax do I used, i've tried

DoCmd.GoToControl txtQuestion1 and I'm receiving type mismatch errors, any idea

Try:
DoCmd.GoToControl "txtQuestion1"

As for the lost data - is the combo box bound or unbound?
 
its unbound, why would that make a difference
 
If the Combobox was the last Control added to your Form, your Tabbing is probably actually going to a new Record, hence the 'disappearing' Combobox data.

In Form Design View, with the Form itself selected, go to Properties - Other and change the Cycle Property to Current Record and see if that solves your problem.

And Freshman was right about needing to use "txtQuestion1" with the Quotation Marks to resolve the Type Mismatch error. That Argument requires a String.

Linq ;0)>
 
Last edited:
its unbound, why would that make a difference

Look I don't have all the info on your app, but was just thinking that the data might disappear as it is not bound to anything. Are you not storing the selection in a table? Or are you just using the selection "one time" in the form?
Hope you came right
 

Users who are viewing this thread

Back
Top Bottom