Solved

How do I close a previewed report after 60 seconds in MS Access?

Posted on 2010-11-10
8
367 Views
Last Modified: 2012-06-22
How can I force a previewed report to CLOSE after some period of time?  A shared, networked application opens a report for preview when requested.  However if the user leaves it open on their desktop, it ties up a table and others cannot preview that report, until it is closed by the first user.

Is there a standard way to handle this multi-user issue?  Does the 'timer' function work on a report that has completed and is being previewed on the screen?  The timer seems to STOP.
Bill
0
Comment
Question by:bcreen
  • 2
  • 2
  • 2
  • +2
8 Comments
 
LVL 77

Expert Comment

by:peter57r
Comment Utility
I wouldn't expect a report to lock things up.
Are you using a split application with each user having their own copy of the front-end?
0
 

Author Comment

by:bcreen
Comment Utility
I found the solution....  sorry I didn't search the "answers" before submitting the question.  The timer stuff works IF instead of Previewing the report, you simply open it in 'Report' mode, instead of Preview mode.

I will close or delete this question.  Thanks for your time!
0
 
LVL 75

Expert Comment

by:DatabaseMX (Joe Anderson - Access MVP)
Comment Utility
"it ties up a table and others cannot preview that report,"
Is the design of the report (sorting/grouping) being modified on the fly when the report opens or any other design change?  Is the report opening any recordsets in code, which would not be a typical situation ?

And I would highly recommend you look into Peter's suggestion.

mx
0
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Access MVP) earned 250 total points
Comment Utility
I would suggest finding out the *real* reason for this, instead of a Timer patch ...

mx
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 74

Expert Comment

by:Jeffrey Coachman
Comment Utility
<No Points Wanted>

FWIW,

1. Timers user quite a bit of system resources.
2. Having a report close automatically may confuse and frustrate users.
3. You will still get the same error if the other users try to open the same report before the timer code kicks in.
4. In some cases the user may need to hold the report Open.  If you close it with a timer, they will only re-open it again, thus triggering the same issue...

For these reasons I am with MX on this...
Go with Pete's suggestion of investigating splitting the DB
(Fix the real problem and there will be no need for the inefficient timer code.)

"The timer stuff works IF instead of Previewing the report, you simply open it in 'Report' mode, instead of Preview mode."
Yes, but remember "Report View" will not generate a 100% faithful representation of the printout.
(No accurate graphics, no page numbering, no page breaks, ...etc)
Also when you add code to the Report, this code may not run in "Report View"

Finally, I will congratulate you on using the "Search" utility here, it is a great first resource.
You just may want to re-evaluate the appropriateness of the solution you found...

;-)

JeffCoachman



0
 

Author Comment

by:bcreen
Comment Utility
Thanks to al contributors.  The  MDB is already 'split' into a data MDB and a design MDB.  The 'Report View' is actually even better than the Preview view for this particular report, as it is a quick on-screen reference as to what other users are using what other (MS Access) applications.  However, since it ALSO gets information from a non-Access third party accounting system, it needs to gather info for the report in TWO steps.  Step one gets Access-app usage, step two gets accounting system usage, from two different sources.

I chose to build a table with the two queries appending into it and the the report uses the table (or a  query based on the table...either way).

So are you guys implying that I could simply (?) use a union query, bypassing the table creation, and use the union query for the report source?  Would doing this, or something similar, solve the conflict with more than one user trying to view the report?  And would this be because the (union-) query would essentially create a virtual or 'temporary table' in each users memory which was unique for that user?

If someone can confirm, I will gladly split the points, as I will have been reminded of a very basic precept.

While we're at it, I considered building tables for this report that would be uniquely named, based on the userid, which I carry around in a public variable in everyone's front-end.... I see drawbacks with bloat and maintenance however.  Thoughts?

Thanks for sticking with me when I wanted to go with a quick fix!  :-)
0
 
LVL 1

Expert Comment

by:Vee_Mod
Comment Utility
Stopping the auto-delete function per the Asker's request here:
http://www.experts-exchange.com/Q_26607552.html

Vee_Mod
Experts-Exchange Moderator
0
 
LVL 77

Assisted Solution

by:peter57r
peter57r earned 250 total points
Comment Utility
"I chose to build a table with the two queries appending into it and the the report uses the table (or a  query based on the table...either way)."

For a multi-user app, such user-specific data should ideally be in the front-end so as not to cause conflicts with other users.

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Lync meeting or Lync conferencing is what many organizations would like to deploy to allow them save money. But companies are now giving up for various reasons, one of which is that they cannot join external meetings (non-federated company meetings)…
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now