runtime error 3265 item not found in this collection

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • NattyPLC
    New Member
    • Nov 2012
    • 1

    runtime error 3265 item not found in this collection

    Code:
    Private Sub GetEMailAddresses(strQuery As String)
    
    Set dbFranchise = CurrentDb()
    Set qdfEMails = dbFranchise.QueryDefs(strQuery)
    get this error on the second line
    This subroutine is being called in another sub where strQuery is also being set.

    Code:
    For Each varQuery In .ItemsSelected
    strQuery = strEMailQueryPrefix & .Column(0, varQuery)
    Call GetEMailAddresses(strQuery)
    Next varQuery
    Last edited by Rabbit; Nov 7 '12, 02:55 AM. Reason: Please use code tags when posting code.
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    Please use code tags when posting code.

    I can only assume you mean line 4 because line 2 is blank and while line 3 is technically the second line of code, I'm making an educated guess that you actually mean line 4.

    The error message is fairly clear. Whatever strQuery is, there's no query def with that name. You should output the name and see if you have a query named that.

    Comment

    Working...