Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / April 2008

Tip: Looking for answers? Try searching our database.

Query Problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Debbie - 20 Apr 2008 03:17 GMT
I have a word merge, trying to merge from my field 'GENDER' which
holds the either Male or Female.  In the word document, I have to ask
the question twice.  I have an M  and an  F and want an X to show up
next to the proper letter.
If Male then X otherwise blank.  M
If Female then X otherwise blank F
I want the X to go in front of the letter of which ever the gender is
and the other to be blank.

In my query I have two fields:
FEMALE: IIf([Gender]=[FEMALE],"X","")
MALE: IIf([Gender]=[FEMALE],"","X")
When I close the design view, this message comes up.
Circular reference caused by alias 'FEMALE' in query definition's
SELECT list.

What am I doing wrong and how can I fix it to ask the question twice?
Debbie - 20 Apr 2008 03:26 GMT
> I have a word merge, trying to merge from my field 'GENDER' which
> holds the either Male or Female.  In the word document, I have to ask
[quoted text clipped - 13 lines]
>
> What am I doing wrong and how can I fix it to ask the question twice?

sorry,  i typed wrong, it says:
FEMALE: IIf([Gender]=[FEMALE],"X",""), which I was going to use for
the questions next to the F
MALE: IIf([Gender]=[MALE],"X",""), which I was going to use for the
questions next to the M
Debbie - 20 Apr 2008 03:36 GMT
> > I have a word merge, trying to merge from my field 'GENDER' which
> > holds the either Male or Female.  In the word document, I have to ask
[quoted text clipped - 21 lines]
>
> - Show quoted text -

Nevermind, thanks anyway. I figured it out.
FEMALE: IIf([Gender]="Female","X","")
MALE: IIf([Gender]="Male","X","")

I needed quotes around Female and Male.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.