WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password

IIf statement

 
   Home -> Office other -> Getting Started RSS
Next:  Getting Started: Question about upgrading  
Author Message
clueless

External


Since: Dec 18, 2007
Posts: 12



(Msg. 1) Posted: Thu Jul 24, 2008 9:33 am
Post subject: IIf statement Add to elertz
Archived from groups: microsoft>public>access>gettingstarted (more info?)

My IIf statement is as follows:

StatusOfAppointment: IIf([ArrivalTime]<[AppointmentTime],"Early",
IIf([ArrivalTime]=[AppointmentTime],"On Time","Late))

I need to add a 15 minute window for the "On Time" (example appt 3:00, would
be on time from 3:00-3:15). Not quite sure what I need to do. Appreciate
any help.
Thanks.
--
clueless
Back to top
Login to vote
Beetle

External


Since: Sep 14, 2006
Posts: 354



(Msg. 2) Posted: Thu Jul 24, 2008 10:10 am
Post subject: RE: IIf statement Add to elertz [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

It should be something along the lines of;

StatusOfAppointment: IIf([ArrivalTime]<[AppointmentTime],"Early",
IIf(DateDiff("n",[ArrivalTime],[AppointmentTime])<=15,"On Time","Late))

--
_________

Sean Bailey


"clueless" wrote:

> My IIf statement is as follows:
>
> StatusOfAppointment: IIf([ArrivalTime]<[AppointmentTime],"Early",
> IIf([ArrivalTime]=[AppointmentTime],"On Time","Late))
>
> I need to add a 15 minute window for the "On Time" (example appt 3:00, would
> be on time from 3:00-3:15). Not quite sure what I need to do. Appreciate
> any help.
> Thanks.
> --
> clueless
Back to top
Login to vote
fredg

External


Since: Jan 30, 2004
Posts: 4447



(Msg. 3) Posted: Thu Jul 24, 2008 10:20 am
Post subject: Re: IIf statement Add to elertz [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Thu, 24 Jul 2008 09:33:05 -0700, clueless wrote:

> My IIf statement is as follows:
>
> StatusOfAppointment: IIf([ArrivalTime]<[AppointmentTime],"Early",
> IIf([ArrivalTime]=[AppointmentTime],"On Time","Late))
>
> I need to add a 15 minute window for the "On Time" (example appt 3:00, would
> be on time from 3:00-3:15). Not quite sure what I need to do. Appreciate
> any help.
> Thanks.

So is that 3:00 AM or 3:00 PM?
Is it considered on time if the Arrival time for an Appointment for
3:00 PM is actually 3:10 AM the next morning? That would meet your
criteria.

You're also missing an ending quote after the word Late in your
expression.

StatusOfAppointment:IIf([ArrivalTime]<[AppointmentTime],"Early",
IIf([ArrivalTime] Between [AppointmentTime] and
DateAdd("n",15,[AppointmentTime]),"On Time","Late"))


--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Back to top
Login to vote
Klatuu

External


Since: Apr 06, 2005
Posts: 2865



(Msg. 4) Posted: Thu Jul 24, 2008 1:07 pm
Post subject: RE: IIf statement Add to elertz [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Iif([ArrivalTime] < [AppointmentTime],"Early",iif([ArrivalTime] <=
dateadd("n",15,[AppointmentTime]),"On Time","Late"))
--
Dave Hargis, Microsoft Access MVP


"clueless" wrote:

> My IIf statement is as follows:
>
> StatusOfAppointment: IIf([ArrivalTime]<[AppointmentTime],"Early",
> IIf([ArrivalTime]=[AppointmentTime],"On Time","Late))
>
> I need to add a 15 minute window for the "On Time" (example appt 3:00, would
> be on time from 3:00-3:15). Not quite sure what I need to do. Appreciate
> any help.
> Thanks.
> --
> clueless
Back to top
Login to vote
Display posts from previous:   
       Home -> Office other -> Getting Started All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
 Office
  Office Other
 Security
 WinRAR
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET