Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / December 2005

Tip: Looking for answers? Try searching our database.

Disabling the prompt to change a modified report

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Paul Simpson - 05 Dec 2005 13:26 GMT
Hi!

I have a report which gets dynamically created in code when a button is
pressed on a form. This is because it is based on a multi-value crosstab
query where just about everything can change!

Anyway, it all works fine, except when I close the report, I get prompted to
save changes to it's design. This I will never want to do, so how do I stop
this?

I have tried report.dirty = false, but that gives an error.

Any help greatly appreciated.

Thanks
Allen Browne - 05 Dec 2005 13:42 GMT
Try closing the report after the design changes like this:
   DoCmd.Close acReport, "Report1", acSaveYes

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> I have a report which gets dynamically created in code when a button is
> pressed on a form. This is because it is based on a multi-value crosstab
[quoted text clipped - 11 lines]
>
> Thanks
Paul Simpson - 05 Dec 2005 19:24 GMT
But surely that will save and close the report at that point?

I need the report on screen (and need the option to print it) until I want
to close it. Also, the report never actually needs to be saved at all. It is
created from scratch each time and then needs to be thrown away. Can I
somehow delete the report (if I save it as you suggest) from its onClose
method?

Paul

> Try closing the report after the design changes like this:
>     DoCmd.Close acReport, "Report1", acSaveYes
[quoted text clipped - 14 lines]
> >
> > Thanks
Allen Browne - 06 Dec 2005 03:55 GMT
Yes, it will save the changes. You can then open it (in Preview or Normal),
and use it with the new settings you saved.

If you don't want it saved at all, you could then delete the report again.

Paul, I don't really understand why you are dynamically creating a report.
That will stop you from ever turning your MDB into an MDE, so I would not
use this approach. Create a generic report with enough unbound controls to
cope with whatever you could need. Then use Report_Open to dynamically
generate a SQL string to use as its RecordSource, loop through the controls
to bind them to the Fields of this source, locate and size the controls
(Left, Top, Width, Height, and Visible), apply any filters, modify the
ControlSource of each GroupLevel, and so on. Design view is not needed, and
there will be no prompt to save.

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> But surely that will save and close the report at that point?
>
[quoted text clipped - 27 lines]
>> >
>> > Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.