I can print a report from a data entry form as long as the record i'm working on has been saved. However, when entering a new record, but before exiting (i.e. saving) it, it doesn't print the new record, but reverts back to the first record in the db. I assume that's because the record hasn't yet been saved. Below is the code for printing, but it seems to me I need some additional code to save the record before printing it. Any suggestions?
Private Sub cmdPrint_Click()
On Error GoTo Err_cmdPrint_Click
Dim stDocName As String
stDocName = "rptOrderTrack"
If Me.Dirty Then
DoCmd.Requery
End If
DoCmd.OpenReport stDocName, acNormal, _
WhereCondition:="[Order#]=" & Me.[Order#]
Exit_cmdPrint_Click:
Exit Sub
Err_cmdPrint_Click:
MsgBox Err.Description
Resume Exit_cmdPrint_Click
End Sub



