This is my event procedure and when i click the button it prompts me to input the "ID" which is the primary key of the record I want to print. How do I make it so it just automatically uses the ID that is on the form?
Private Sub cmdPrintRecord_Click()
Dim strReportName As String
Dim strCriteria As String
strReportName = "rptPrintRecord"
strCriteria = "[ID]='" & Me![ID] & "'"
DoCmd.OpenReport strReportName, acViewPreview, , strCriteria
End Sub
Private Sub cmdPrintRecord_Click()
Dim strReportName As String
Dim strCriteria As String
strReportName = "rptPrintRecord"
strCriteria = "[ID]='" & Me![ID] & "'"
DoCmd.OpenReport strReportName, acViewPreview, , strCriteria
End Sub