Showing a hidden form

G

Guest

Hi there!

I have a clients form with multiple subforms. When I have the user click
the "Payments" button and the payments form opens, it hides my clients form.
Private Sub Form_Activate()

Forms!frmclients.Visible = False

This works great. Then when I close the payments form using this code:
Private Sub Form_Deactivate()
Forms!frmclients.Visible = True

However, the database window ends up getting the focus and I have to go to
the window menu to find my clients form. I have tried hiding the database
window using Tools/Startup and all that does is hide everything and I have to
go to Window/Unhide.

What am I doing wrong here?

Thanks!

JR
 
T

tina

add the following code after setting the form's Visible property back to
True, as

DoCmd.SelectObject acForm, "frmclients"

if you have problems with it, try moving the both lines of code from the
payments form's Deactivate event to its' Close event.

hth
 

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