Printing current record

SarahBash

Registered User.
Local time
Today, 22:05
Joined
Feb 10, 2010
Messages
14
Hi

I am wondering if someone could offer some advice.

I have a data entry form within my database. I would like to have the option for the form to be printed. I have designed the report for this and within the form I have attached the following code to the print preview button:

Private Sub Command91_Click()
If Me.Dirty Then
RunCommand acCmdSaveRecord
End If
DoCmd.OpenReport "Rpt_LeaveApplication", acViewPreview, , ID = " & Me.txtID"
End Sub

The problem is that when I click on the button, it previews the report, but none of the information from the form is on the report.

Anyone have any suggestions???
:confused::confused::confused:

Thank you in advance,
Sarah
 
Let's get you on the right track, your syntax (in the WHERE bit) is incorrect.

DoCmd.OpenReport "Rpt_LeaveApplication", acViewPreview, , "[ID] = " & Me.txtID
 
Okay. Can you give me a clue as to what it should be???
 

Users who are viewing this thread

Back
Top Bottom