Circular reference error in query kicks me out of Access

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I created a query with a circular reference. Everytime I try to enter the Design view (or run the query) to correct the problem, MS Access shuts down. Is there another way to open the query to edit it other than design view. Or is there a way to suspend the operations of the query to just open it?
 
You could try the following (on a copy), using it to grab the sql statement and
paste it into an editor. Then you could copy the edited code and paste that
into the query.

Open up your database
Type Control-G to get the debug window.

Enter
?currentdb().QueryDefs("YourQueryNameHere").SQL
press return

Select the text returned in the debug window and copy it.

Now type
currentdb().QueryDefs("YourQueryNameHere").SQL="SELECT * FROM YourTable"

Now open YourQueryNameHere in SQL Design mode and replace
"SELECT * From YourTable"
with the text you have copied.

Edit it to make it manageable.
 
Back
Top