Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
| Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old December 17th, 2007, 03:51 PM
Authorized User
 
Join Date: Oct 2007
Location: Buffalo, NY, USA.
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default Report prompts to save changes on close

Hello,
I recently developed an Access application for a client. I tested everything on my pc, and it all worked fine... now the client is using the application on their machine, which has Access 2003 installed. When you try to close a report, Access pops up a dialog box asking whether you want to save changes to the report... it doesn't seem to matter whether you say yes or no - the same thing happens the next time you close out of the report. I even tried adding a

Code:
DoCmd.Save
command to the OnClose event. The prompt still comes up. Does anyone know of a way to eliminate/suppress these messages?

Thanks

  #2 (permalink)  
Old December 18th, 2007, 10:45 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

What is probably happening is that the user's PC is reformatting the report for their default printer when they open it, which "changes" the report, and Access is asking if they want to save those changes. This should only happen the first time they open and close the report. You might try this on the On Close event of the reports:

DoCmd.SetWarnings False

This will suppress the save dialog, but it will also suppress all other similar warnings.

Did that help?




mmcdonal

Look it up at: http://wrox.books24x7.com
  #3 (permalink)  
Old December 18th, 2007, 11:34 AM
Authorized User
 
Join Date: Oct 2007
Location: Buffalo, NY, USA.
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

That makes sense... i'll try it out. it'll be a while before i can test it to find out whether that resolves the issue or not, though. Thanks very much for the insight.

  #4 (permalink)  
Old January 4th, 2008, 09:16 AM
Friend of Wrox
Points: 4,007, Level: 26
Points: 4,007, Level: 26 Points: 4,007, Level: 26 Points: 4,007, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

How about if you put the

DoCmd.SetWarnings False

on the ON OPEN event of the report and put the

DoCmd.SetWarnings True

on the ON CLOSE event instead? Perhaps the save report trigger will happen BEFORE the DoCmd and your warning settings will be reset to normal when you're shot back to the form.


Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division


Similar Threads
Thread Thread Starter Forum Replies Last Post
Open Workbook,Copy Sheet,Move Sheet, Close/Save ptrussell2009 Excel VBA 0 June 13th, 2008 02:28 PM
Save report to Windows 2003 Server Bhavin Crystal Reports 0 March 14th, 2005 02:39 PM
Save crystal report as image [URGENT] usamaalam Crystal Reports 1 February 18th, 2005 07:03 PM
Close and Save errors Tucky Excel VBA 0 October 28th, 2004 11:46 PM
Parameter Prompts scruffy jim Crystal Reports 1 May 30th, 2004 01:04 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.