Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
  1. #16
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    9,470
    'but why does this have to be coded two times?
    It doesn't, unless the developer wants it to do that. In the first call you are passing the system date as noted. In the second, you're passing a hard coded date which doesn't need a conversion function if you write it as #08/01/2021#
    EDIT


    BTW - isn't the first test in the IIF function testing if Sunday = Saturday? That will never be true.
    - "doesn't work" doesn't help. Implement changes in copies of your database.
    Iím telling everyone it's good to eat dried grapes. Itís all about raisin awareness.

  2. #17
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    2,823
    BTW - isn't the first test in the IIF function testing if Sunday = Saturday? That will never be true.
    @Micron, check the definition of the WeekDay() function. The second argument, vbSunday defines the first day of the week.

  3. #18
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    9,470
    Quote Originally Posted by davegri View Post
    @Micron, check the definition of the WeekDay() function. The second argument, vbSunday defines the first day of the week.
    Yeah, guess I should have but momma was standing there waiting for me to take her to her appointment. I don't recall ever using that function.
    - "doesn't work" doesn't help. Implement changes in copies of your database.
    Iím telling everyone it's good to eat dried grapes. Itís all about raisin awareness.

  4. #19
    ssanfu is offline Master of Nothing
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,413
    From the code
    'where is the date coming from in order to evaluate and populate the message box?
    Maybe this demo I whipped up will help

    Enter a date and click the button.
    Then enter any text (I used Amy ) and click the button. There is some validation code in the button click.
    Set a break point on the button click code to tract what is happening....
    Attached Files Attached Files
    HTH
    -----
    Steve
    --------------------------------
    "Veni, Vidi, Velcro"
    (I came; I saw; I stuck around.)

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 10-16-2019, 03:45 PM
  2. Assigning values to variables
    By missniffy in forum Programming
    Replies: 3
    Last Post: 02-21-2018, 03:09 PM
  3. Assigning a variable
    By tguitard in forum Programming
    Replies: 1
    Last Post: 05-02-2013, 12:22 PM
  4. Replies: 29
    Last Post: 06-19-2012, 12:12 PM
  5. Assigning value to an image
    By cdzajp in forum Forms
    Replies: 1
    Last Post: 06-16-2011, 12:05 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