Showing a hidden form

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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
 
Back
Top