Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / March 2005

Tip: Looking for answers? Try searching our database.

Msgbox before printing

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sandy H - 08 Mar 2005 12:52 GMT
Hi
I hope someone can help me with this.

I want to be able to open a report in Preview mode and when I click the
print button, have a message box tell me to put labels in the printer.  Is
this at all possible or will I need to put a custom button on my toolbar?  I
tried the OnPrint property but this doesn't appear to be the function of
that property.

I know the obvious thing to do would be print from a form, but my users want
to see the report first.

Thanks in advance
Sandy
fredg - 08 Mar 2005 16:32 GMT
> Hi
> I hope someone can help me with this.
[quoted text clipped - 10 lines]
> Thanks in advance
> Sandy

Here is the code you will need.
Code each of the events as indicated.
The actual starting value of intPreview depends upon if you are using
a control to calculate [Pages] (something like ="Page " & [Paga] & "
of " & [Pages]).
Note that intPreview is Dimmed up in the report declarations section.

Option Compare Database
Option Explicit
Dim intPreview As Integer
___________________________

Private Sub Report_Activate()
intPreview = -2    ' with [Pages]
' intPreview = -1  ' without [Pages]
End Sub
___________________________

Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As
Integer)

If intPreview >= 1 Then    ' with [Pages]
'If intPreview >= 0 Then   ' without [Pages]
   MsgBox "Load the Labels!"
End If
intPreview = intPreview + 1

Printing will begin as soon as the message box is clicked OK, so load
the labels before clicking.

Signature

Fred
Please only reply to this newsgroup.
I do not reply to personal email.

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.