M
Margaret Bartley
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.
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.