Thanks for the quick reply pbaldy, this is how it goes, I enter data in the form, then I print that, this is the code that is behind the print button.
Code:
Private Sub cmdPrinttoPDF_Click()
Dim strwhere As String
Dim stDocName As String
Dim vRet, vFile
On Error GoTo ErrPrt
stDocName = "rpt_Letters_Pass"
vRet = UserPickFile()
If vRet <> "" Then
If InStr(vRet, ".pdf") = 0 Then vRet = vRet & ".pdf"
vFile = vRet
strwhere = "[ID] = " & Me.[ID]
DoCmd.OpenReport stDocName, acViewReport, , , acHidden
DoCmd.OutputTo acReport, stDocName, acFormatPDF, vFile
DoCmd.GoToRecord , , acNewRec
End If
Then the form goes to new record and I enter the data and when I print, it will not print that new record that I just entered, it prints my previous record.