Results 1 to 4 of 4
  1. #1
    DMT Dave is offline VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,191

    Retrieve Day Number From Day Name


    Hi Guy's, how do you get a day number from a day name ?

    I have a combo (cboDay) set as Value List Monday;Tuesday;Wednesday;Thursday;Friday

    I have a field called DayNo Set as Number

    When i select Wednesday, how do i set it to auto add 4 to DayNo (Sunday being Day 1 system day of the week)

    Thank you

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,540
    Try the Weekday() function.

  3. #3
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,412
    Set your combo value list to 2;Monday;3;Tuesday;4;Wednesday;5;Thursday;6;Friday

    change the column count to 2 and column width to 0 (which will hide the first column)

  4. #4
    DMT Dave is offline VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,191
    Well thought of, it's the simplest of things that are typically hard to do

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

Similar Threads

  1. Replies: 2
    Last Post: 08-05-2019, 01:24 PM
  2. using SQL in VBA to retrieve data
    By sovereign in forum Access
    Replies: 8
    Last Post: 08-25-2015, 10:17 AM
  3. Replies: 1
    Last Post: 02-05-2015, 08:12 AM
  4. how to retrieve the column name
    By rlaplume in forum Access
    Replies: 3
    Last Post: 04-09-2013, 12:41 PM
  5. Search and Retrieve
    By sadath in forum Access
    Replies: 3
    Last Post: 07-02-2010, 04:54 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