G
Guest
I would like to have a report that will show the data that the user is
looking at on a form. With the Code bellow it only opens but it does not show
any data. The Link [Permit_Ap_Key_ID] is a number.
Private Sub Command21_Click()
On Error GoTo Err_Command21_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Permit_Rpt"
stLinkCriteria = [Permit_Ap_Key_ID] = " & Me![Permit_Ap_Key_ID] & "
DoCmd.Close
DoCmd.OpenReport stDocName, acViewPreview, , stLinkCriteria
Exit_Command21_Click:
Exit Sub
Err_Command21_Click:
MsgBox Err.Description
Resume Exit_Command21_Click
End Sub
looking at on a form. With the Code bellow it only opens but it does not show
any data. The Link [Permit_Ap_Key_ID] is a number.
Private Sub Command21_Click()
On Error GoTo Err_Command21_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Permit_Rpt"
stLinkCriteria = [Permit_Ap_Key_ID] = " & Me![Permit_Ap_Key_ID] & "
DoCmd.Close
DoCmd.OpenReport stDocName, acViewPreview, , stLinkCriteria
Exit_Command21_Click:
Exit Sub
Err_Command21_Click:
MsgBox Err.Description
Resume Exit_Command21_Click
End Sub