Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / July 2005

Tip: Looking for answers? Try searching our database.

"Item not found", but I know it's there - I can see it!

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Margaret Bartley - 10 Jul 2005 01:18 GMT
I'm using VBA to create a query, run it, open it, get a count of records,
and then enter that record count into the Description property of the query.
It works fine, except that occassionally I will get an error,
       "Item not found in this collection"
when I try to create the property.

When I go into debug mode, I can go to the list of queries, and open the
query.  It exists.  I've checked the name, the name is the same.  I've
created the query, but my procedure can't find it.

When I go into the Locals window, and look at the Tables documents, that
query will not  be listed.  I've noticed that there are some tables with
names that start "~TMPCL....." with Create times about when my query would
have been created.

I thought maybe the code was too fast, but I've stopped the code, opened the
query, closed it, and it still doesn't show up.

when I go to the Command window, and type in
       ? db.containers("Tables").Documents("ABC").Properties.Count
I get the same error,  "Item not found in this collection"

Clearly, what is happening is that there are two names for these queries,
one that shows up in the User Interface, the other a system name, and they
are getting confused.

Has anyone seen this?  Any solution?
Most of the time it works, but sometimes it doesn't.
I've tried compact and repair, that doesnt' help, either.
tina - 10 Jul 2005 02:16 GMT
if you're using A2000 or newer, is Name AutoCorrect turned OFF in your db?
if not, suggest you turn it off (a good idea even if it doesn't fix your
problem). if it has no effect, you might try this before giving up the idea:

create a new blank db
immediately turn off Name AutoCorrect (Tools | Options | General tab)
import the objects from your other database
compact the new db

hth

> I'm using VBA to create a query, run it, open it, get a count of records,
> and then enter that record count into the Description property of the query.
[quoted text clipped - 25 lines]
> Most of the time it works, but sometimes it doesn't.
> I've tried compact and repair, that doesnt' help, either.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.