Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Close a report like forms

Status
Not open for further replies.

helmi

Technical User
Mar 10, 2003
18
0
0
SG
Is there a way for me to close my preview report like using the command button in forms?I have no knowledge using VBA. Pls help me....
 
Paste the following code into a module

Function CloseActiveReport()
On Error Resume Next
DoCmd.Close acReport, Screen.ActiveReport.Name
End Function

Create a custom menu, toolbar or button (View-Toolbars-Customize)
Attach the function to it (Right click the button and choose Properties, then in OnAction box type 'CloseActiveReport'.

Whenever you have a report open, you can close it by clicking the button...

Good luck


[pipe]
Daniel Vlas
Systems Consultant
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top