Results 1 to 7 of 7
  1. #1
    Paul H's Avatar
    Paul H is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Location
    Richmond, VA
    Posts
    591

    Turn Screen Updating off and on in Access

    Does Access have a syntax comparable to Excel's Application.ScreenUpdating = False (or True)



    In my application I put my report into design mode to make some changes, save it and then reopen it in print preview. The process takes about 2 or 3 seconds, long enough to observe the design view and property box. I think this looks kind of tacky and I would like hide it till it is finished.

    Can this be done?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I'm curious why you do it, as that technique won't work in some environments. In any case, OpenReport has an argument that will let you open the report hidden.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Paul H's Avatar
    Paul H is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Location
    Richmond, VA
    Posts
    591
    Well, it was the only way I found to set the rowsource and other properties on the charts in my reports. Any other way I tried resulted in run-time error 2451, "The report 'myreport' you entered is misspelled or refers to a report that isn't open or doesn't exist." if it is closed or run-time error 2771, "The bound or unbound object frame you tried to edit does not contain an OLE object." if it is already open. I don't get any errors when I put it into design view.

    I wasn't aware of the keep hidden option. That works just fine, but I am open to it if you have them.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    If it's working for you, I guess I'd leave it alone. I suspect you'll have problems if you ever want to provide users with an mde/accde or have users with the runtime version of Access. I don't think the code will work in either scenario. If you get there, I'd try changing the settings in the open event of the report. That's where I do dynamic record sources and such. It should also be faster, since you wouldn't be opening/closing/opening the report.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    Paul H's Avatar
    Paul H is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Location
    Richmond, VA
    Posts
    591
    I see your point(s). I'll give that a try when time allows.

  6. #6
    Paul H's Avatar
    Paul H is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Location
    Richmond, VA
    Posts
    591
    Here's a twist. This report is likely already open. I am using a pop up form over the report to update it on request. I don't see anyway around closing the report first and reopening it, at least under this current scenario. These are all charts and I had embedded them in a form (much simpler), but they also want to print them as reports, so I canned the embedded form in favor of hovering over and updating the reports. It's been along torturous journey, but no method I've found so far has been without its drawbacks. Using the embedded form was much smoother, but I had to maintain duplicate of each chart on a report which comes with it's own set of problems.

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Sounds tricky. If it's open in Preview mode, it's static and you probably do have to close it first. The new Report view is interactive, so you might be able to leave it open there. I've only used that a couple of times, when I wanted the look of a report with the interactivity of a form (though it is read only). I know you can change its record source while its open.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Login Screen in Access
    By Di7bash in forum Access
    Replies: 3
    Last Post: 03-18-2014, 11:57 PM
  2. Turn OFF Warnings in Access 2010
    By taimysho0 in forum Programming
    Replies: 3
    Last Post: 01-27-2012, 05:47 PM
  3. Replies: 5
    Last Post: 01-04-2012, 05:14 PM
  4. how to make fit on screen of ms access form?
    By alex_raju in forum Forms
    Replies: 2
    Last Post: 07-25-2011, 05:28 PM
  5. Replies: 11
    Last Post: 06-05-2011, 09:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums