Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2010-11-10
8
Medium Priority
?
425 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 1000 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 1000 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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
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 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…

661 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