Results 1 to 3 of 3
  1. #1
    klnlsu is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Apr 2015
    Posts
    107

    using day of week in a query


    I have a logic question...I have processes set up in my database that I run on certain days of the week (some processes run more that once a week). I have a combo box that uses a process sequence table to show me what order to run my processes in. I would like to set up Boolean fields in my process sequence records for each day of the week that I can turn on or off depending on whether I want to run that process that day, then my combo box would only list the processes to run for that day. I know how to use the DatePart function to find the day of the week, but how do I compare that to my fields in my table? Keep in mind that some of my processes run more than once a week, so I can't simply create a single field with a weekday number or day in it. I may be making a mountain out of a molehill. Can someone help?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    in the query , format 1 field to give DOW: format([datefield],"w")
    Sun=1, Mon=2....

    if you need, make a table of tDOW,
    1,Sun
    2, Mon
    etc

    then you can join the text day from the form combo box,
    this would filter on tDow joined to the query and the numeric field format([datefield],"w")
    and only pull data for that one DoW.

  3. #3
    klnlsu is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Apr 2015
    Posts
    107
    That works! Thanks.

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

Similar Threads

  1. Replies: 2
    Last Post: 04-14-2016, 06:30 PM
  2. Replies: 26
    Last Post: 11-05-2015, 01:58 PM
  3. Replies: 9
    Last Post: 06-19-2015, 03:37 PM
  4. Replies: 1
    Last Post: 01-28-2015, 12:19 PM
  5. Replies: 3
    Last Post: 09-19-2013, 10:18 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