T
TK
I have a form open through a command button with a criteria set. I recently
changed a few form names to more proper form names, I have made what I can
see is the nessary changes to any code or property that might refer to the
old form names.
The problem now is that when I click on the open form button I get a message
saying that the open form action was canceled. When I remove the criteria
code the form will open but will not be filtered, I need to filter to be
working.
Here is my code:
Private Sub cmdWorkOrder_Click()
On Error GoTo Err_cmdWorkOrder_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmWorkOrders"
stLinkCriteria = "[InspectionNo]=" & "'" & Me![txtInspectionNo] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdWorkOrder_Click:
Exit Sub
Err_cmdWorkOrder_Click:
MsgBox Err.Description
Resume Exit_cmdWorkOrder_Click
End Sub
changed a few form names to more proper form names, I have made what I can
see is the nessary changes to any code or property that might refer to the
old form names.
The problem now is that when I click on the open form button I get a message
saying that the open form action was canceled. When I remove the criteria
code the form will open but will not be filtered, I need to filter to be
working.
Here is my code:
Private Sub cmdWorkOrder_Click()
On Error GoTo Err_cmdWorkOrder_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmWorkOrders"
stLinkCriteria = "[InspectionNo]=" & "'" & Me![txtInspectionNo] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdWorkOrder_Click:
Exit Sub
Err_cmdWorkOrder_Click:
MsgBox Err.Description
Resume Exit_cmdWorkOrder_Click
End Sub