Circular Reference Error

  • Thread starter Thread starter Tia
  • Start date Start date
T

Tia

Can anyone see what would be causing me to get a circular reference error???
Thanks!

SELECT [BartS1Report].Customer_ID, [BartS1Report].Customer,
[BartS1Report].Service_Address, [BartS1Report].Employee,
[BartS1Report].Manager, [BartS1Report].Type_of_System,
[BartS1Report].Raw_Water, [BartS1Report].Treated_Water,
[BartS1Report].Cycles, [BartS1Report].Inhibitor_Level,
[BartS1Report].Range_1, [BartS1Report].Range_2, [BartS1Report].Range_3,
[BartS1Report].Range_4, [BartS1Report].Range_5, ((SELECT Sum([XX].[ZZZ]) FROM
[BartS1Report] AS [XX] WHERE [BartS1Report].Customer_ID &
[BartS1Report].Customer & [BartS1Report].Service_Address &
[BartS1Report].Employee & [BartS1Report].Manager &
[BartS1Report].Type_of_System & [BartS1Report].Raw_Water &
[BartS1Report].Treated_Water & [BartS1Report].Cycles
& [BartS1Report].Inhibitor_Level & [BartS1Report].Range_1 &
[BartS1Report].Range_2 & [BartS1Report].Range_3 & [BartS1Report].Range_4 &
[BartS1Report].Range_5 >= [XX].Customer_ID & [XX].Customer &
[XX].Service_Address & [XX].Employee & [XX].Manager & [XX].Type_of_System &
[XX].Raw_Water & [XX].Treated_Water & [XX].Cycles & [XX].Inhibitor_Level &
[XX].Range_1 & [XX].Range_2 & [XX].Range_3 & [XX].Range_4 &
[XX].Range_5)\20)+1 AS Record_Count
FROM BartS1Report
ORDER BY [BartS1Report].Customer_ID, [BartS1Report].Customer,
[BartS1Report].Service_Address, [BartS1Report].Employee,
[BartS1Report].Manager, [BartS1Report].Type_of_System,
[BartS1Report].Raw_Water, [BartS1Report].Treated_Water,
[BartS1Report].Cycles, [BartS1Report].Inhibitor_Level,
[BartS1Report].Range_1, [BartS1Report].Range_2, [BartS1Report].Range_3,
[BartS1Report].Range_4, [BartS1Report].Range_5;
 
Do you have a field ZZZ in BartS1Report? It seems really different from your
other field names. Is BartS1Report actually a table or is it a query?
 
BartS1Report is a Query that takes information from a bunch of tables. It
was suggested that I add the field ZZZ to it to count my records so that I
only have 20 displayed per report and place remaining records on a new
report. The query, BartS1Report, is the data source for a report called
BartS1Report.


Duane Hookom said:
Do you have a field ZZZ in BartS1Report? It seems really different from your
other field names. Is BartS1Report actually a table or is it a query?

--
Duane Hookom
Microsoft Access MVP


Tia said:
Can anyone see what would be causing me to get a circular reference error???
Thanks!

SELECT [BartS1Report].Customer_ID, [BartS1Report].Customer,
[BartS1Report].Service_Address, [BartS1Report].Employee,
[BartS1Report].Manager, [BartS1Report].Type_of_System,
[BartS1Report].Raw_Water, [BartS1Report].Treated_Water,
[BartS1Report].Cycles, [BartS1Report].Inhibitor_Level,
[BartS1Report].Range_1, [BartS1Report].Range_2, [BartS1Report].Range_3,
[BartS1Report].Range_4, [BartS1Report].Range_5, ((SELECT Sum([XX].[ZZZ]) FROM
[BartS1Report] AS [XX] WHERE [BartS1Report].Customer_ID &
[BartS1Report].Customer & [BartS1Report].Service_Address &
[BartS1Report].Employee & [BartS1Report].Manager &
[BartS1Report].Type_of_System & [BartS1Report].Raw_Water &
[BartS1Report].Treated_Water & [BartS1Report].Cycles
& [BartS1Report].Inhibitor_Level & [BartS1Report].Range_1 &
[BartS1Report].Range_2 & [BartS1Report].Range_3 & [BartS1Report].Range_4 &
[BartS1Report].Range_5 >= [XX].Customer_ID & [XX].Customer &
[XX].Service_Address & [XX].Employee & [XX].Manager & [XX].Type_of_System &
[XX].Raw_Water & [XX].Treated_Water & [XX].Cycles & [XX].Inhibitor_Level &
[XX].Range_1 & [XX].Range_2 & [XX].Range_3 & [XX].Range_4 &
[XX].Range_5)\20)+1 AS Record_Count
FROM BartS1Report
ORDER BY [BartS1Report].Customer_ID, [BartS1Report].Customer,
[BartS1Report].Service_Address, [BartS1Report].Employee,
[BartS1Report].Manager, [BartS1Report].Type_of_System,
[BartS1Report].Raw_Water, [BartS1Report].Treated_Water,
[BartS1Report].Cycles, [BartS1Report].Inhibitor_Level,
[BartS1Report].Range_1, [BartS1Report].Range_2, [BartS1Report].Range_3,
[BartS1Report].Range_4, [BartS1Report].Range_5;
 
I would just start removing fields/columns until the error went away. The
last thing you removed would then be the culprit.

--
Duane Hookom
Microsoft Access MVP


Tia said:
BartS1Report is a Query that takes information from a bunch of tables. It
was suggested that I add the field ZZZ to it to count my records so that I
only have 20 displayed per report and place remaining records on a new
report. The query, BartS1Report, is the data source for a report called
BartS1Report.


Duane Hookom said:
Do you have a field ZZZ in BartS1Report? It seems really different from your
other field names. Is BartS1Report actually a table or is it a query?

--
Duane Hookom
Microsoft Access MVP


Tia said:
Can anyone see what would be causing me to get a circular reference error???
Thanks!

SELECT [BartS1Report].Customer_ID, [BartS1Report].Customer,
[BartS1Report].Service_Address, [BartS1Report].Employee,
[BartS1Report].Manager, [BartS1Report].Type_of_System,
[BartS1Report].Raw_Water, [BartS1Report].Treated_Water,
[BartS1Report].Cycles, [BartS1Report].Inhibitor_Level,
[BartS1Report].Range_1, [BartS1Report].Range_2, [BartS1Report].Range_3,
[BartS1Report].Range_4, [BartS1Report].Range_5, ((SELECT Sum([XX].[ZZZ]) FROM
[BartS1Report] AS [XX] WHERE [BartS1Report].Customer_ID &
[BartS1Report].Customer & [BartS1Report].Service_Address &
[BartS1Report].Employee & [BartS1Report].Manager &
[BartS1Report].Type_of_System & [BartS1Report].Raw_Water &
[BartS1Report].Treated_Water & [BartS1Report].Cycles
& [BartS1Report].Inhibitor_Level & [BartS1Report].Range_1 &
[BartS1Report].Range_2 & [BartS1Report].Range_3 & [BartS1Report].Range_4 &
[BartS1Report].Range_5 >= [XX].Customer_ID & [XX].Customer &
[XX].Service_Address & [XX].Employee & [XX].Manager & [XX].Type_of_System &
[XX].Raw_Water & [XX].Treated_Water & [XX].Cycles & [XX].Inhibitor_Level &
[XX].Range_1 & [XX].Range_2 & [XX].Range_3 & [XX].Range_4 &
[XX].Range_5)\20)+1 AS Record_Count
FROM BartS1Report
ORDER BY [BartS1Report].Customer_ID, [BartS1Report].Customer,
[BartS1Report].Service_Address, [BartS1Report].Employee,
[BartS1Report].Manager, [BartS1Report].Type_of_System,
[BartS1Report].Raw_Water, [BartS1Report].Treated_Water,
[BartS1Report].Cycles, [BartS1Report].Inhibitor_Level,
[BartS1Report].Range_1, [BartS1Report].Range_2, [BartS1Report].Range_3,
[BartS1Report].Range_4, [BartS1Report].Range_5;
 
Back
Top