Office 2007 - rename query problem

F

finster26

I'm using Office 2007 - Access. I rename a working query. I run the query but
it asks for a paramater which has the old name it. For example:
"qStreet.field1". The new name of the query name is "qStreetNew". The
correct field is "qStreetNew.field1". I renamed it back to the old name and
it works and doesn't ask for the parameter. Can't seem to find out why this
is happening.
 
C

Clifford Bass via AccessMonster.com

Hi,

I do not see why renaming a query would cause it to fail. Are you using
this query in another query? And that query is the one that is failing? If
so, that would explain the problem. What you might do in such an instance is
rename the qStreet query, then open up the query that depends on it in SQL
view. Where it says "...FROM qStreet...", change to "...FROM qStreetNew AS
qStreet...". Then go into design view. Right-click on the "qStreet" item in
the top section and choose Properties. Change the Alias to qStreetNew and
press <Enter>. Try running it to see if it now works correctly. If that
does not solve the problem, post the SQL of the queries involved and their
names.

Clifford Bass
 
G

Gina Whipp

finster26,

I have seen this happen when after you rename the query you don't check the
OrderBy field. While the query has been renamed the OrderBy still says
Order By: qStreet.field1. Fix that by either putting in the correct name of
the query of simply deleting what is on the OrderBy line.

--
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top