Share via

Hide form when opening report

Anonymous
2010-08-26T14:15:57+00:00

Hi,

This is what I want to happen…when I select a report from my form, I want the form to disappear (but not close) when the report pops up. And then when I close the report, I’d like for the form to reappear.

How do I do this?

Thank you for the help.

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Tom van Stiphout 40,211 Reputation points MVP Volunteer Moderator
2010-08-26T14:18:51+00:00

You can set the Visible property to False:

Me.Visible = False

DoCmd.OpenReport "myReport", ...

Then in the Report's Close event to set the form to be visible again:

Forms!myForm.Visible = True


-Tom. Microsoft Access MVP

Was this answer helpful?

2 people found this answer helpful.
0 comments No comments

Answer accepted by question author

Anonymous
2010-08-26T16:22:40+00:00

Yes, in the VBA for the Click event. To get to it, view the form in design view; view its Properties; find the Click event on the option box; and click the ... icon by it. The VBA editor will open with the existing code; just add Tom's line to it. On the Report, view the report's Properties, and add a new [Event Procedure] to the Close event.


John W. Vinson/MVP

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Anonymous
    2010-08-26T18:44:44+00:00

    Fantastic!  I love you guys!

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2010-08-26T14:37:54+00:00

    Thanks for the quick reply.  The first part Me.Visible = False, I put that in my form, correct?  I'm not sure where to put it.  I have an option box with some OnClick code.  Do I put it here?

    Thanks again.

    Was this answer helpful?

    0 comments No comments