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.