Current record report

Lvalencia

Registered User.
Local time
Today, 08:28
Joined
Jan 2, 2015
Messages
12
I want to send, in an email, the current record on a report. I have the command button set up to send the report. However I am having trouble using the following code to open the report on the current record. It returns all of the records that I have entered. If I add quotation marks after control number it opens up to a blank report.
:confused:
Control number is my ID field and discrepancy is the name of my form.

What am I missing or why does it not open on the current record??

Private Sub Report_Open(Cancel As Integer)
Me.Filter = "control number=" & Forms![discrepancy]![control number]
Me.FilterOn = True
End Sub

Thanks for the help!!
 
For starters the field name needs brackets due to the inadvisable space. What is the data type of that field?
 

Users who are viewing this thread

Back
Top Bottom