Help with On Print Event

G

Guest

I am printing time card labels for our employees. The user need to change
the pay period dates for every pay period. In the label report I created
an unbound field for the user to input the pay period date. The dates are
inputted from a form and pass through to the On Print Event on the label
detail section.

This is the code
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
PayPeriod = Forms!frmPayPeriod!StartDate & "-" & Forms!frmPayPeriod!EndDate
& " " & WorkUnit
End Sub

This code is place on the unbound field on the label report.

The problem is that sometimes the code does not process the first record of
the label report. That is the pay period dates are missing from the first
record of the label sheet.
 
G

Guest

You can also create a textbox where its control source is
= Forms!frmPayPeriod!StartDate & "-" & Forms!frmPayPeriod!EndDate & " " &
WorkUnit

and place it on the page header of your report,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top