Results 1 to 3 of 3
  1. #1
    jcaptchaos2 is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Apr 2011
    Posts
    36

    Formula mod help


    I have this iff statement in a table that is working for what I needed it to do, I need some help modifying it.

    Code:
    IIf([shift]=3,[date]-1,[date])
    There is a field name in that table named "Time On" I need the formula to read,
    Code:
    IIf([shift]=3 and Time On is between 00:01am and 06:00am ,[date]-1,[date])
    Thanks

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    The field name would have to be bracketed, due to the inadvisable spaces, and the 2 time values would need to be surrounded by #.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    jcaptchaos2 is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Apr 2011
    Posts
    36
    Ok thank you pbaldy will giv it a try

Please reply to this thread with any new information or opinions.

Similar Threads

  1. SQL Formula to Sum Itself
    By Scorpio11 in forum Access
    Replies: 1
    Last Post: 02-19-2011, 11:22 AM
  2. Formula for form
    By chanoc24 in forum Forms
    Replies: 3
    Last Post: 08-18-2010, 10:40 PM
  3. Refine my formula, please
    By DianeG in forum Queries
    Replies: 4
    Last Post: 05-19-2010, 09:20 AM
  4. Formula
    By hschrunk in forum Access
    Replies: 3
    Last Post: 05-18-2010, 01:40 PM
  5. Help with formula for Query
    By goldie6175 in forum Queries
    Replies: 1
    Last Post: 02-18-2010, 11:29 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums