Decipher Error Message

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
 
A

Allen Browne

Tia, follow through the recovery sequence steps in this article:
http://allenbrowne.com/recover.html

This will help you track down issues related to references, bad compile, bad
binary, bad indexes, etc.

If you get to step 7 and it still won't compile, put the cursor into
IsLoaded, and press Shift+F2 to verify that you do have this function in
your database. If not, you can copy it from the Northwind sample database.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top