- Total Members: 220,025
- Threads: 525,387
- Posts: 976,997
-
October 16th, 2003, 04:43 AM
#1
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
-
October 24th, 2003, 11:57 AM
#2
'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
-
By ixt45 in forum .NET Development
Replies: 2
Last Post: September 24th, 2004, 01:18 PM
-
By TimS in forum ASP Development
Replies: 4
Last Post: December 27th, 2003, 12:12 AM
-
By jagdishprabhu in forum ASP Development
Replies: 0
Last Post: December 11th, 2003, 04:54 AM
-
By anafyr in forum ASP Development
Replies: 1
Last Post: November 27th, 2003, 09:54 AM
-
By Em Rave in forum ASP Development
Replies: 1
Last Post: October 19th, 2003, 01:21 PM