S
sjones
I just spent several hours building a rather complex query. When I use Docmd.OpenQuery "LookupGeneralDiscount",acViewDesign in the
Debug window it opens the Query just fine. When I use print CurrentDb.QueryDefs("LookupGeneralDiscount").Name I receive the message
"Item not found in collection."
Then I noticed in the Database window for queries that "LookupGeneralDiscount" had a space appended to the name, i.e.
"LookupGeneralDiscount ".
I opened the query with docmd using the name with a space and without. It is the same query. So I decided to remove the space and
received the message that the query already exists and "do I want to replace the existing query". I went ahead and renamed the query
and Access promptly deleted it for me and now is lost to the world.
Is anyone familiar with this behavior?
S Jones
Debug window it opens the Query just fine. When I use print CurrentDb.QueryDefs("LookupGeneralDiscount").Name I receive the message
"Item not found in collection."
Then I noticed in the Database window for queries that "LookupGeneralDiscount" had a space appended to the name, i.e.
"LookupGeneralDiscount ".
I opened the query with docmd using the name with a space and without. It is the same query. So I decided to remove the space and
received the message that the query already exists and "do I want to replace the existing query". I went ahead and renamed the query
and Access promptly deleted it for me and now is lost to the world.
Is anyone familiar with this behavior?
S Jones