Circular Reference

A

asmenend

I have a field titled "purpose", and within that field users can select
"Other" if one of their choices is not included. If they do choose "other"
they would then enter in their purpose in a field titled other_purpose.

I am creating a query where I would like to only pull one purpose field if
that is possible so that I don't take up any unnecessary room on a report.
I've been trying the following iff statement but as you can see it results in
a circular reference:

Purpose: IIf([purpose]="Other (Please Describe
Below)",[Other_Description],[Purpose])

Does anybody have another solution for my problem?

Thanks in advance
 
K

KARL DEWEY

You are using the alias with the same name as your orignal field.
Use something like this --
Purpose of Xxxxx: IIf([purpose]="Other (Please Describe
Below)",[Other_Description],[Purpose])
 
A

asmenend

AAAHHH....thank you!

KARL DEWEY said:
You are using the alias with the same name as your orignal field.
Use something like this --
Purpose of Xxxxx: IIf([purpose]="Other (Please Describe
Below)",[Other_Description],[Purpose])

--
KARL DEWEY
Build a little - Test a little


asmenend said:
I have a field titled "purpose", and within that field users can select
"Other" if one of their choices is not included. If they do choose "other"
they would then enter in their purpose in a field titled other_purpose.

I am creating a query where I would like to only pull one purpose field if
that is possible so that I don't take up any unnecessary room on a report.
I've been trying the following iff statement but as you can see it results in
a circular reference:

Purpose: IIf([purpose]="Other (Please Describe
Below)",[Other_Description],[Purpose])

Does anybody have another solution for my problem?

Thanks in advance
 
J

John Spencer

In Addition to using an alias that is not the same as a field in the query,
you can usually use the same name if you fully reference the field by
including its tablename.

This would probably work.

Purpose: IIf([YourTableName].[purpose]="Other (Please Describe
Below)",[YourTableName].[Other_Description],[YourTableName].[Purpose])

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
AAAHHH....thank you!

KARL DEWEY said:
You are using the alias with the same name as your orignal field.
Use something like this --
Purpose of Xxxxx: IIf([purpose]="Other (Please Describe
Below)",[Other_Description],[Purpose])

--
KARL DEWEY
Build a little - Test a little


asmenend said:
I have a field titled "purpose", and within that field users can select
"Other" if one of their choices is not included. If they do choose "other"
they would then enter in their purpose in a field titled other_purpose.

I am creating a query where I would like to only pull one purpose field if
that is possible so that I don't take up any unnecessary room on a report.
I've been trying the following iff statement but as you can see it results in
a circular reference:

Purpose: IIf([purpose]="Other (Please Describe
Below)",[Other_Description],[Purpose])

Does anybody have another solution for my problem?

Thanks in advance
 

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