I have a command button on a 'Inspection' form
This command button is to open an additional form that shows the inspection details.
When clicking on the command button, the form opens to a blank form and not showing any data.
Any idea why this is not working? This is the code I have behind the button:
Private Sub Command82_Click()
On Error GoTo Err_Command82_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "FDA-Form"
stLinkCriteria = "[InspID]=" & Me![InspectionID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command82_Click:
Exit Sub
Err_Command82_Click:
MsgBox Err.Description
Resume Exit_Command82_Click
End Sub
This command button is to open an additional form that shows the inspection details.
When clicking on the command button, the form opens to a blank form and not showing any data.
Any idea why this is not working? This is the code I have behind the button:
Private Sub Command82_Click()
On Error GoTo Err_Command82_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "FDA-Form"
stLinkCriteria = "[InspID]=" & Me![InspectionID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command82_Click:
Exit Sub
Err_Command82_Click:
MsgBox Err.Description
Resume Exit_Command82_Click
End Sub