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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

IIf statements



 
 
Thread Tools Display Modes
  #1  
Old August 27th, 2006, 08:27 AM posted to microsoft.public.access.forms
IIf Statement Help
external usenet poster
 
Posts: 1
Default IIf statements

I am creating a labor invoice form and am trying to write an IIf statement
that deals with the following information:
r time, o time, p time
The employee will work either regular time, over time or premn time. (Never
multiple times in a work day) I need the IIf statement to fill in the cell
based on type of time the employee submits.

I am using the following IIf Statement :
=IIf(IsNull([r time] Or [o time]),[p time])


  #2  
Old August 27th, 2006, 10:39 AM posted to microsoft.public.access.forms
Wayne-I-M
external usenet poster
 
Posts: 3,674
Default IIf statements

Hi

Time: IIf([SubmitField=[r time],[r time],IIf([SumbmitField]=[o time],[o
time],[p time]))


I have assumed that you will select the “type” of time from a field called
SubmitField you can change this to whatever it is you use.

Just a point – I would change your field names to get rid of the spaces.
[r time] to [r_time]
[o time] to [o_time]
[p time] to [p_time]

Good luck with your project

--
Wayne
-In-Manchester, England.
Enjoy whatever it is you do


"IIf Statement Help" wrote:

I am creating a labor invoice form and am trying to write an IIf statement
that deals with the following information:
r time, o time, p time
The employee will work either regular time, over time or premn time. (Never
multiple times in a work day) I need the IIf statement to fill in the cell
based on type of time the employee submits.

I am using the following IIf Statement :
=IIf(IsNull([r time] Or [o time]),[p time])


  #3  
Old August 27th, 2006, 10:46 AM posted to microsoft.public.access.forms
Wayne-I-M
external usenet poster
 
Posts: 3,674
Default IIf statements



Sorry - [SubmitField should be [SubmitField] (typeing error)

Time: IIf([SubmitField]=[r time],[r time],IIf([SumbmitField]=[o time],[o
time],[p time]))

--
Wayne
-In-Manchester, England.
Enjoy whatever it is you do


  #4  
Old August 27th, 2006, 12:09 PM posted to microsoft.public.access.forms
Ofer Cohen
external usenet poster
 
Posts: 1,683
Default IIf statements

Not sure if that what you are looking for, select by priority
1. [r time]
2. [o time]
3. [p time]

IIf(Not IsNull([r time]),[r time], IIf(Not IsNull([o time]), [o time] , [p
time]))

--
Good Luck
BS"D


"IIf Statement Help" wrote:

I am creating a labor invoice form and am trying to write an IIf statement
that deals with the following information:
r time, o time, p time
The employee will work either regular time, over time or premn time. (Never
multiple times in a work day) I need the IIf statement to fill in the cell
based on type of time the employee submits.

I am using the following IIf Statement :
=IIf(IsNull([r time] Or [o time]),[p time])


 




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 03:47 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.