[AccessD] Save on Report Close not working

Susan Harkins ssharkins at gmail.com
Thu Mar 19 12:47:33 CDT 2009


I knew it was going to be something simple...

Originally, I just wanted to reset the filter before the report closed, but 
the report didn't save it, and I just wasn't thinking when I added the save 
to the Close -- you're right, setting it on the open event is much 
simpler... Thanks!

Susan H.

> What are you trying to do, Susan?  You're using a report_close event to
> open and close a report in design view:  the report being closed?  Why
> not set the filter to that in the open event of the report instead?
>
> Charlotte Foust
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins
> Sent: Thursday, March 19, 2009 10:12 AM
> To: AccessD at databaseadvisors.com
> Subject: [AccessD] Save on Report Close not working
>
> Private Sub Report_Close()
>  'Reset filter property
>
>  DoCmd.OpenReport "rptCustomerLabels", acViewDesign
>  Me.Filter = "PrintLabel = -1"
>  DoCmd.Save acReport, "rptCustomerLabels"
>
> End Sub
>
> ========I added this to a report's Close event -- it's an existing
> report solution and I don't want to completely rework it to add this
> simple feature. I'm resetting the Filter property, but the original
> report relies on the Filter setting above, so I have to reset it and
> save the report -- but it just doesn't work. It doesn't even seem to
> fire! I'm closing the report from the Close button.
>
> Susan H.
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com 




More information about the AccessD mailing list