SetFocus Quirk

J

JonWayn

I have a form that gets called with a wide variety of OpenArgs and looks a
reacts specifically with each argument. I do all the cosmetics in the load
event of the form.
The form absically has, from top down,
1. a label with a message describing the mode of the form.
2. an option group with 4 options with accompanying labels, either of which
may be hidden or visible depending on the form argument
3. a command button that carries out the forms action when clicked. The
action again depends on opening argument to the form.
In most instances, the option group defaults to null, which forces the user
to make a selection, which enabled the command button. In one particular
personality of the form, the option group defaults to 1, the first option,
the command button is enabled, and the focus is set to the command button.
The quirk here is that whenever the focus is set to the command button in the
Load event, the top control, the message label, is decapitated. The upper
portion of that label is off-screen even no attempt is made in any of the
form's flavors, to reposition this control. I am clueless as to what might be
causing this behaviour. Any ideas?

Thanks
 
J

Jeanette Cunningham

What happens if you just comment out the line of code that sets focus to the
command button in the load event.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top