PC Review


Reply
Thread Tools Rate Thread

Calculated field producing possible 4 different results

 
 
New Member
thuzinec's Avatar
Join Date: May 2008
Location: Houston, TX
Posts: 3
 
      12th Aug 2011
I need help with the syntax in a calculated field. I will give you an example of what I am trying to accomplish.

Yes and Out of State $9,000 result in field $9,000
No and Out of State $6,500 result in field $6,500
No and In State $5000 result in field $5,000
Yes and In State $7,500 result in field $7,500

Result: IIf([y/nField]=-1,[InStateAndYes],[InStateAndNo]) And (IIf([y/nField]=0,[OutStateYes],[OutStateNo]))

The [InStateAndYes] is a field in the table which contains 7500, similarly the other fields contain:
[InStateAndNo]=5000
[OutStateAndYes]=9000
[OutStateAndNo]=6500

Can this be done?

Thanks for your time.
 
Reply With Quote
 
 
 
 
New Member
thuzinec's Avatar
Join Date: May 2008
Location: Houston, TX
Posts: 3
 
      12th Aug 2011
Ok, got it all worked out just in case someone might have the same problem.

My fields are:
[InStateAndYes]=7500
[InStateAndNo]=5000
[OutStateAndYes]=9000
[OutStateAndNo]=6500
And the Yes and No field is called [D24]
Also I have a field that is a [P_Services Deployment Status]….for “In State” and “Out State”
What I was trying to accomplish is if the user selects “Yes” and “In State” it will return a value of $7,500, “Yes” and “Out State” it will return a value of $9,000, “No” and “In State” it will return a value of $5,000, “No” and “Out State” it will return a value of $6,500

The answer is:
Result: IIf([D24]=-1,IIf([P_Services Deployment Status]=2,[InStateAndYes],[OutStateAndYes]),IIf([P_Services Deployment Status]=2,[InStateAndNo],[OutStateAndNo]))
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Only 5 results from calculated field Rick B Microsoft Access Queries 0 24th Jan 2007 01:28 PM
Re: Help with getting calculated field results into table Baz Microsoft Access Form Coding 6 13th Jan 2007 06:14 PM
Calculated field, sum/avg results of qry? =?Utf-8?B?UndoNTc1Nw==?= Microsoft Access Queries 3 25th Nov 2006 08:11 PM
Anomalous results in a calculated field =?Utf-8?B?Q3JhenkgTGFkeQ==?= Microsoft Access Queries 3 20th Jul 2005 03:00 PM
Results of calculated field do not appear in report Jaycee Microsoft Access Reports 2 26th Aug 2003 08:00 PM


Features
 

Advertising
 

Newsgroups
 


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