Results 1 to 5 of 5
  1. #1
    mike02 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2012
    Posts
    245

    circular reference cause by query

    Hello,

    I have a query that runs just fine. but when i make a report of the query it will not run. It says "Circular Refrence caused by 'query'



    here is the sql of the query.

    Code:
    TRANSFORM First(qryHypotheticalReturns.YTD) AS FirstOfYTD
    SELECT tblProducts.ProductName
    FROM qryHypotheticalReturns INNER JOIN tblProducts ON qryHypotheticalReturns.ProductID = tblProducts.ProductID
    WHERE (((tblProducts.ProductID)=4 Or (tblProducts.ProductID)=6))
    GROUP BY tblProducts.ProductName, tblProducts.ProductID
    ORDER BY tblProducts.ProductID
    PIVOT qryHypotheticalReturns.Year;
    the query runs on its own, but it will not run in my report. anyone deal with this issue before?

    thanks,

  2. #2
    offie is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2013
    Posts
    176
    I get that error when I name something the same as one of the things I'm using to calculate it: ex: count(Name1) As Name1. So my guess is that you did a calculation or code somewhere where you named it the same thing? I don't see that in the query SQL so it would probably be in the report?

  3. #3
    mike02 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2012
    Posts
    245
    I have had that before. I dont think its the issue here.

    It origionally worked, but once i made a form to have a parameter on the queries with the report. i have a Between date criteria:

    Between #31/01/2005# And forms!frmReportCenter!cboDate

  4. #4
    offie is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2013
    Posts
    176
    Huh, werid. Are the selections for the combo formatted to be dates? Have you made sure that the query/record sources in the report are up to date? How are the dates set up on your computer/Access (have you had an issue with dates before)?
    That's all I got, Good luck!

  5. #5
    mike02 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2012
    Posts
    245
    solved it. I had a cross tab query that i got data from for my setup query for this cross tab. I didnt define the column headings.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Circular reference caused by
    By rncarterjm in forum Queries
    Replies: 1
    Last Post: 04-02-2013, 08:59 PM
  2. Replies: 3
    Last Post: 11-01-2012, 12:55 PM
  3. Replies: 6
    Last Post: 08-10-2012, 09:30 AM
  4. Replies: 6
    Last Post: 06-27-2011, 07:11 PM
  5. Expression builder error, circular reference
    By cowboy in forum Programming
    Replies: 3
    Last Post: 07-15-2010, 12:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums