Multi User Access Problem with printing reports

Liz_I3

Well-known Member
Joined
Dec 30, 2002
Messages
647
Office Version
  1. 2016
Platform
  1. Windows
I have a multi user (about 8) Access 2000 DB. IF two users happen to request the same report at almost the same time only the second request is printed twice. It is a if the queries parameters change before the first request is printed and so prints the second request twice. If you wait a few seconds before sending the second request both reports do print correctly. Is there a way I could pause the query for a second or two before it excepts the next set of paremeters?

Thanks
Liz
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
One possibility is to drop in a coded wait command.
Not sure if this would fix your problem though. Depends on how it's coded.
Sure sounds like the report is based on the contents of a query or table records and other users have the ability to change those records before the database is done with the print request.

Code:
Private Declare Sub sapiSleep Lib "Kernel32" _
        Alias "Sleep" _
        (ByVal dwMilliseconds As Long)

Sub sSleep(lngMilliSec As Long)
    If lngMilliSec > 0 Then
        Call sapiSleep(lngMilliSec)
    End If
End Sub

DoEvents might be an option also (in Access Help)

Mike
 
Upvote 0
Hi Mike thanks for your assistance

You are correct the report is based on an SQL query that requires the user to input 2 parameters and team number and a date.
So yes if an other users request the report with a different team number, the records or query changes before the database is done with the first print request.

So what would work best the wait command or the doevents?

Thanks again
liz
 
Upvote 0
I haven't really tested, but I've read that DoEvents doesn't always do what it's supposed to do.

What I'm thinking is pretty involved - by that I mean there may be a simpler method but I'm not sure what it might be offhand.

What you could try is this: Save the current status of your print requests as a record in a given table. Aka, user issues a print request and it changes a value in a table that pretty much says "I'm busy" and changes it back once it's done.

Each new print request would probably need to sorta go into a queue - re-issue the request every so often until the database is 'available' but after a set period of time to go ahead and print away.

Some good ideas on methods over at www.accessweb.com and www.fabalou.com

Mike
 
Upvote 0
Another option is to create seperate front ends for your users, more work when you are updating, but less prone to problems.

HTH

Peter
 
Upvote 0
Thanks for all the help
I was told that I should put a edit Lock on the query. Does this make sense ?

Liz
 
Upvote 0

Forum statistics

Threads
1,221,814
Messages
6,162,132
Members
451,743
Latest member
matt3388

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top