I am getting this error when I attempt to opening a report in print preview:
The expression On Open ...............Procedure declaration does not match ...
This is the code I run when I run the report.
Public Sub NewAge()
CurrentAge = Null
BirthDate = Nz(DLookup("BirthDate", "DogT", "DogID=" & DogID), 0)
If IsNull(BirthDate) Then Exit Sub
CurrentAge = HowLong(BirthDate, True, "ym", False, False)
End Sub
Private Sub Report_Open()
NewAge
End Sub
I use this same procedure in a form without an issue. I've also done a Debug Compile.
Any help would be greatly appreciated.
Thanks