Results 1 to 2 of 2
  1. #1
    Sweetnuff38 is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    1

    Complicated IIF?

    I need to do the following but need direction on how to make it all work.

    Convert OperationsDate to a number (day of week – in query.. call it WeekDayNumber )

    IIf OperationsDate (in Dispatch Table) is greater than or equal to EffectiveFrom (in Schedules Table) and Less than or equal to EffectiveTo (in Schedules Table) AND



    IIF WeekDayNumber (in qrySchedules) equal to a value (ie: 123----, ---45--, -----67 etc) in DaysofOperation (in Schedules table)

    Then run update query to return all records that apply....to a tblTemp

    help... please....

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    weekday([fieldname]) will return an integer value for the day of the week, bu default sunday is day 1 of the week, but it can be changed, so if you wanted monday to be 1 you could have

    weekday([fieldname],2), in essence telling access you want day 2 to be counted as day 1.

    I don't follow what you are trying to say but weekday is the function you're after to return a numeric value.

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

Similar Threads

  1. Complicated counting problem
    By fender357 in forum Programming
    Replies: 10
    Last Post: 04-29-2011, 07:19 PM
  2. Complicated auto populate
    By duncthepunk in forum Forms
    Replies: 7
    Last Post: 03-17-2011, 10:37 PM
  3. Replies: 2
    Last Post: 11-23-2010, 11:44 AM
  4. Help? Complicated Drop-Down
    By Pick9811 in forum Access
    Replies: 7
    Last Post: 06-19-2010, 01:35 PM
  5. Complicated ASP SQL to Access db
    By KLynch0803 in forum Programming
    Replies: 0
    Last Post: 01-31-2010, 08:32 PM

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