T
Tia
When I open my form, it opens the code and highlights the
IsLoaded("ProductList") and when I try to close it, I'm told the debugger is
closing. What do I need to do to fix my code?? I've checked all the names
used in the code and they appear to be correct. What else do I need to check
for?
Private Sub Form_Current()
On Error GoTo Err_Form_Current
' If ProductList form is open, show current vendor's products.
Dim strDocName As String
Dim strLinkCriteria As String
strDocName = "Product List"
strLinkCriteria = "[Vendor_ID] = Forms![Vendors]![Vendor_ID]"
If IsNull(Me![Vendor_Name]) Then
Exit Sub
ElseIf IsLoaded("ProductList") Then
DoCmd.OpenForm strDocName, , , strLinkCriteria
End If
Exit_Form_Current:
Exit Sub
Err_Form_Current:
MsgBox Err.Description
Resume Exit_Form_Current
End Sub
IsLoaded("ProductList") and when I try to close it, I'm told the debugger is
closing. What do I need to do to fix my code?? I've checked all the names
used in the code and they appear to be correct. What else do I need to check
for?
Private Sub Form_Current()
On Error GoTo Err_Form_Current
' If ProductList form is open, show current vendor's products.
Dim strDocName As String
Dim strLinkCriteria As String
strDocName = "Product List"
strLinkCriteria = "[Vendor_ID] = Forms![Vendors]![Vendor_ID]"
If IsNull(Me![Vendor_Name]) Then
Exit Sub
ElseIf IsLoaded("ProductList") Then
DoCmd.OpenForm strDocName, , , strLinkCriteria
End If
Exit_Form_Current:
Exit Sub
Err_Form_Current:
MsgBox Err.Description
Resume Exit_Form_Current
End Sub