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 » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

IIf AND



 
 
Thread Tools Display Modes
  #1  
Old July 2nd, 2008, 05:16 PM posted to microsoft.public.access.queries
Gringarlow
external usenet poster
 
Posts: 21
Default IIf AND

I want to determine if a field is between two values.
If RecTime is between 1000 and 1200, return Y, otherwire return blank.
Thank You
  #2  
Old July 2nd, 2008, 05:42 PM posted to microsoft.public.access.queries
NBullock
external usenet poster
 
Posts: 11
Default IIf AND

Try this

Expr1: IIf([RecTime] Between "1000" And "1200","Y",Null)


"Gringarlow" wrote in message
news
I want to determine if a field is between two values.
If RecTime is between 1000 and 1200, return Y, otherwire return blank.
Thank You



  #3  
Old July 2nd, 2008, 05:49 PM posted to microsoft.public.access.queries
fredg
external usenet poster
 
Posts: 4,386
Default IIf AND

On Wed, 2 Jul 2008 09:16:04 -0700, Gringarlow wrote:

I want to determine if a field is between two values.
If RecTime is between 1000 and 1200, return Y, otherwire return blank.
Thank You


Exp:IIf([RecTime]=1000 and [RecTime]=1200,"Y","")
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
  #4  
Old July 2nd, 2008, 06:03 PM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 7,815
Default IIf AND

Use the following expression.
Assumption: Rectime is a datetime field.

IIF(RecTime Between #10:00:00# and #12:00:00#,"Y",Null)

John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County

Gringarlow wrote:
I want to determine if a field is between two values.
If RecTime is between 1000 and 1200, return Y, otherwire return blank.
Thank You

 




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