PDA

View Full Version : My report prints the same page every time



Tezzies
01-09-2009, 02:30 AM
I select print which opens a report of the active job and prints, if I then select another job and select print it still prints the pevious report. Any ideas why ??. I am a total newbie to access so any help would be greatly appreciated . Heres the code----


Private Sub print_Click()
On Error GoTo Err_print_Click

'Makes sure we only print out the relevent job, instead of
'all of them

Dim strDocName As String
Dim strWhere As String
strDocName = "Main_Table"
strWhere = "[Job No]=" & Me![Job No]
DoCmd.OpenReport strDocName, acPreview, , strWhere
DoCmd.PrintOut acSelection

Exit_print_Click:
Exit Sub
Err_print_Click:
MsgBox Err.Description
Resume Exit_print_Click

End Sub

Many thanks in advance.

Oorang
01-09-2009, 03:36 PM
Because you coded it that way;) To make it how you would like could you please describe what you are trying to make it do a little more?