A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Creating query with Calculated Field



 
 
Thread Tools Display Modes
  #1  
Old May 8th, 2009, 08:57 PM posted to microsoft.public.access
princessA
external usenet poster
 
Posts: 6
Default Creating query with Calculated Field

I am creating a query with a calculated field named MonthlyFeeStatus. This
field should equal Active if the MembershipStatus field is equal to Active
and equals Not Active otherwise. How would I set up this equation. Thanks
--
PrincessaIzMe
  #2  
Old May 8th, 2009, 09:28 PM posted to microsoft.public.access
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Creating query with Calculated Field

On Fri, 8 May 2009 12:57:01 -0700, Princessa
wrote:

I am creating a query with a calculated field named MonthlyFeeStatus. This
field should equal Active if the MembershipStatus field is equal to Active
and equals Not Active otherwise. How would I set up this equation. Thanks


MonthlyFeeSatus: IIF([MembershipStatus] = "Active", "Active", "Not Active")

This assumes that MembershipStatus has values other than "Active" and "Not
Active"; if those are the only two, then you can simply echo the field:

MonthlyFeeStatus: [MembershipStatus]

--

John W. Vinson [MVP]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:09 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.