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  

Expressions/Functions



 
 
Thread Tools Display Modes
  #1  
Old November 4th, 2008, 03:32 PM posted to microsoft.public.access
sgranstaff
external usenet poster
 
Posts: 1
Default Expressions/Functions

I am new to Access and what I know is self taught from the website, so I
appologize if this is a stupid question...

I have a field [REASON CODE] that is a drop down box containing the
following options: FML, PER, WC, MIL, FMLInt

I have two other fields ([BCBS Due] and [COBRA Due]) that contain working
expressions, are numeric, and are the sum of several other fields.

In the billing section of my form, I am trying to write an expression for
the amount due based on the above information. The information listed below
is true:
If reason code=FML, payment due=BCBS due
If reason code=PER, payment due=COBRA due
If reason code=WC, payment due=0
If reason code=FMLInt, payment due=NA
If reason code=MIL, payment due=Company Paid

There are no other outcomes, however i will need to add to these expressions
for the remaining payment due amounts. I think i could figure out the others
if i had the first one. i don't know what would be best, an IIF/switch
function or what...


HELP PLEASE!
--
Shannon Granstaff
  #2  
Old November 4th, 2008, 06:07 PM posted to microsoft.public.access
Clifford Bass[_2_]
external usenet poster
 
Posts: 1,295
Default Expressions/Functions

Hi Shannon,

The Switch() function is easier to write and read when dealing with
your type of situation. For that reason, I would use it.

Clifford Bass

"sgranstaff" wrote:

I am new to Access and what I know is self taught from the website, so I
appologize if this is a stupid question...

I have a field [REASON CODE] that is a drop down box containing the
following options: FML, PER, WC, MIL, FMLInt

I have two other fields ([BCBS Due] and [COBRA Due]) that contain working
expressions, are numeric, and are the sum of several other fields.

In the billing section of my form, I am trying to write an expression for
the amount due based on the above information. The information listed below
is true:
If reason code=FML, payment due=BCBS due
If reason code=PER, payment due=COBRA due
If reason code=WC, payment due=0
If reason code=FMLInt, payment due=NA
If reason code=MIL, payment due=Company Paid

There are no other outcomes, however i will need to add to these expressions
for the remaining payment due amounts. I think i could figure out the others
if i had the first one. i don't know what would be best, an IIF/switch
function or what...


HELP PLEASE!
--
Shannon Granstaff

 




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:48 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.