Solved

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

Posted on 2010-11-10
8
417 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +2
8 Comments
 
LVL 77

Expert Comment

by:peter57r
ID: 34103497
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
ID: 34103727
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
ID: 34103740
"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
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 
LVL 75

Accepted Solution

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

mx
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 34106605
<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
ID: 34110219
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
ID: 34110545
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
ID: 34112096
"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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

734 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