By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,080 Members | 1,845 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,080 IT Pros & Developers. It's quick & easy.

set focus on 1st item in combo box & error handling

P: 13
I have 2 questions.

1)How can I do a setfocus on the first item in a combo box populated with a query. I figured I could somehow use the index of 0 but I can't figure out the syntax to do it.
2)I set up error handling on a subform that requires a field in the main subform to be clicked. If the user doesn't select one I get the constraint violation. How can I cause the subform to default back to as if nothing was typed there. Basically automating pressing the escape key to back out of the form and prevent changes.
I have the error control in there, I just don't know the syntax to undo changes to the subform.
Mar 19 '08 #1
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 374
In regards to your Dropdown list, just simply set the value of the field that you're doing the lookup on to the value that is in the list. If this is something different for each use of the form, then that get's a little more complicated.

As for the error handling, if you simply set the value in the first question, you avoid the second problem all together.

Hope that helps,

If you need more help, PM me on this site.

Joe P.
Mar 20 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.