Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using prtMip & prtDevMode for Paper Size in a multiuser DB

Status
Not open for further replies.

SirTECH

Technical User
Jul 24, 2005
42
CA
I'm running a multiuser database, which means reports are printed from various printers. I can use code to size the reports to Legal, however I can't suppress the message for other users, "You do not have exclusive access to this database. Your design changes cannot be saved..."
I don't want to give everyone administrators access, and I don't need the report to be saved when closed since the VB code will resize it next time it's opened.
The subroutine I use to call SetSize() is below. The SetSize() subroutine(lengthy code not shown here) uses prtMip & prtDevMode to set the paper size.
-------------------------------------------------
Private Sub Command19_Click()

Call SetSize("rptName", LegalSize)
'skip this line DoCmd.Close acReport, "rptName", acSaveYes
DoCmd.OpenReport stDocName, acPreview

End Sub
---------------------------------------------------
By skipping the "DoCmd.Close acReport,"rptName",acSaveYes" line, the report opens, and is viewable in LegalSize. However, when the user closes the report, the warning pops up.
I've tried using the DoCmd.SetWarnings False, but it did not work.
Any Suggestions?
 
Why not using acSaveNo ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Using acSaveNo does avoid the unwanted message, but since the report is then closed without saving, the desired Legal size is not maintained.
To avoid the save process, in code, I've opened the report in design mode, set the papersize to legal, then opened the report in preview mode.
Everything to this point works. But when the user closes the report, the aggrevating message appears.
Thanks for your reply.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top