#1
  1. No Profile Picture
    Contributing User
    ASP Explorer (0 - 99 posts)

    Join Date
    Oct 2003
    Posts
    79
    Rep Power
    12

    Error 3265. Item not found in this collection


    I have a query with a parameter that references a form; I need to update the underlying table on which the query is based and have been trying to create some code to do so.

    First of all I got an error 'Too few parameters. Expected 1' which is apparently caused because the query references a form. I modified the query temporarily so that it didn't reference the form and it worked but that is not an acceptable solution so I have modified my code as below but I now get an error 'Item not found in this collection'

    Sub Test()

    Dim dbsA As Database, rstA As Recordset, qdfA As QueryDef

    Set dbsA = CurrentDb
    Set qdfA = dbsA.QueryDefs("Pricing Test")
    qdfA![Forms]![Pricing Screen]![Site_id] = [Forms]![Pricing Screen]![Site_id]
    Set rstA = dbsA.OpenRecordset("Pricing Test", dbOpenDynaset)

    End Sub

    Any help appreciated.

    Mike Collard
  2. #2
  3. No Profile Picture
    Moderator: Access, SQL
    ASP Mastermind (5000+ posts)

    Join Date
    Oct 2003
    Posts
    5,126
    Rep Power
    19
    'Item not found in this collection' generally means the the field name you are referencing in you SQL statement doesn't exist in the table. Check to make sure you spelled the field name correctly.

    S-

Similar Threads

  1. Replies: 2
    Last Post: September 24th, 2004, 02:18 PM
  2. Replies: 4
    Last Post: December 27th, 2003, 01:12 AM
  3. help needed to retrieve item selected in a list box
    By jagdishprabhu in forum ASP Development
    Replies: 0
    Last Post: December 11th, 2003, 05:54 AM
  4. Replies: 1
    Last Post: November 27th, 2003, 10:54 AM
  5. Request URL from catalogue item
    By Em Rave in forum ASP Development
    Replies: 1
    Last Post: October 19th, 2003, 02:21 PM

IMN logo majestic logo threadwatch logo seochat tools logo