C1 field name causes circular reference in domain functions?

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

Came across this odd error; can anyone explain?

Create a TABLE1 with one field named C1 long integer.

Go to immediate window, enter ?DSUM("C1","TABLE1")

You get:
Run Time error 3103; Circular reference caused by alias C1 in query
definition's select list.

Same thing happens with DMIN, DMAX, DAVG. Not a problem with field
names like A1, B1 or C2.

Can work around it by creating a query and aliasing the C1 column to
another name and run the domain function on that.

So what's special about C1?
 
wierd...I get same results as you...
can only imagine "C1" is used in
code behind Dxxx routine??
 
Not sure but try:

?DSUM("[C1]","[TABLE1]")

HTH
Van T. Dinh
MVP (Access)
 
Brackets alone don't seem to help, but a coworker suggested:

?DSUM("[TABLE1]![C1]","[TABLE1]")

which DOES elimiate the error. Seems C1 must be a calculated column
used internally by the domain functions; specifying we want C1
specifically from the source table is enough to differentiate it from
the internal(?) C1.

Mike

Not sure but try:

?DSUM("[C1]","[TABLE1]")

HTH
Van T. Dinh
MVP (Access)



Mike said:
Came across this odd error; can anyone explain?

Create a TABLE1 with one field named C1 long integer.

Go to immediate window, enter ?DSUM("C1","TABLE1")

You get:
Run Time error 3103; Circular reference caused by alias C1 in query
definition's select list.

Same thing happens with DMIN, DMAX, DAVG. Not a problem with field
names like A1, B1 or C2.

Can work around it by creating a query and aliasing the C1 column to
another name and run the domain function on that.

So what's special about C1?
 
It does sound that way. It is the same with the SQL String

SELECT ProductCode

which will return a GUID, possibly the GUID for Access software.
 

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

Back
Top