Changing active form: DoCmd.SelectObject or set Visible properties

M

Max Moor

Hi All,

In a previous post, I asked how to make one of multiple open windows be
on top (active) from VBA. I got two suggestions. One was to use
DoCmd.SelectObject and the other was to have all but the active window be
hidden, switching around which one is visible.

Is there any real advantage to one method over the other? Certainly,
the SelectObject version makes for much simpler code. Is there any reason
why I wouldn't want mupltiple forms visible at once though? I can't think of
one, but I miss the subtleties of Access pretty regularly. :)

Thanks for the help.

Regards,
Max
 
A

Anthos

I would tend to agree with Max, with the added belief.

Make it simple for the user.

By telling Access where you want to set focus, you are specificly
bringing a form to the front,
Lets say that you had 3 forms already opened, and you did a hide,
there is no certainty that you would have the right object with the
focus, however, by using set focus, you know for sure, where the focus
will be.

As an addition to that, hiding the forms that are not in use by the
user is good practice, as having multiple forms opened, detracts the
end user from their primary focus.

Regards
Anthony Moore

IT Excellence
 

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