Hello,
I want to print selected record in report view from a form. I found the visual basic code to limit my report to the current record using a form button but nothing happens!! At first it worked but I had to enter in the correct "ApplicantID", now nothing happens. I have started over from scratch several times and now I cant get event procedures to work at all.
My report is called "rtpAdvisingForm" and my unique identifier is the "ApplicantID" from the Applicant table, which is what my form and report both pull from. Macros are enabled and location is trusted.
Here is the code I am using:
Private Sub Command149_Click()
Dim strReportName As String
Dim strCriteria As String
strReportName = "rptAdvisingForm"
strCriteria = "ApplicantID='" & Me!ApplicantID & "'"
DoCmd.OpenReport strReportName, acViewPreview, , strCriteria
End Sub
What is going on?! Is there an easier way to get around this with macros?
I attached my database
thanks!