D
Daniel
Hi Guys.
I'm trying to run a report on the currently viewed record in my form.
This is the VBA that I'm currently using
Private Sub Command211_Click()
DoCmd.OpenReport "Fax Reminder Form", acViewPreview, , _
"[EmployeeIdentifier]=Forms!frmEmployee_Details_Form![EmployeeIdentifier]"
End Sub
Fax Reminder Form is the name of my report
EmployeeIdentifier is the unique field used to identify the record
For some reason using the code brings up the very first record in my table.
Here is my SQL if that helps
SELECT [Employee Details].FirstName, [Employee Details].Surname, [School
Details].Principal, [Employee Details].EmployeeIdentifier
FROM [Employee Details], [School Details];
I'm trying to run a report on the currently viewed record in my form.
This is the VBA that I'm currently using
Private Sub Command211_Click()
DoCmd.OpenReport "Fax Reminder Form", acViewPreview, , _
"[EmployeeIdentifier]=Forms!frmEmployee_Details_Form![EmployeeIdentifier]"
End Sub
Fax Reminder Form is the name of my report
EmployeeIdentifier is the unique field used to identify the record
For some reason using the code brings up the very first record in my table.
Here is my SQL if that helps
SELECT [Employee Details].FirstName, [Employee Details].Surname, [School
Details].Principal, [Employee Details].EmployeeIdentifier
FROM [Employee Details], [School Details];