Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20
  1. #16
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,861
    @moke123

    Nice Job. I could not create something like that in a Month of Sundays , however I would point out that Xmas day is a Friday this year.?



    Would this be the start day parameter that needs setting.?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  2. #17
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,643
    Not sure what you mean. 12/25/20 is a friday on the calendar. Did you get an error?
    There are no parameters to set.

    I should have probably indicated that you double click a date to input or edit an entry.

    I just edited the original post to include that.
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  3. #18
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,861
    Might it be as I am in the UK with dd/mm/yyyy format then?

    Question: Why does this site allow you to copy images into the post then just hides them?

    Click image for larger version. 

Name:	Capture.PNG 
Views:	11 
Size:	20.5 KB 
ID:	43573
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  4. #19
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,861
    With my mods
    Click image for larger version. 

Name:	Capture.PNG 
Views:	11 
Size:	23.9 KB 
ID:	43574
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  5. #20
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,643
    For those who want to learn by my mistakes I originally used vbUseSystem for the day of week argument in the weekday function.

    Code:
    FirstDateOnGrid = FirstDate - Weekday(FirstDate, vbUseSystem) + 1
    Since I'm in the U.S. it worked fine for me but gasman is in U.K. with a different system date format.

    I've updated the original file I posted with a 1 for Sunday as the first day of week argument in the function.

    Code:
    FirstDateOnGrid = FirstDate - Weekday(FirstDate, 1) + 1
    Gasmans' modification used a constant to correct the UK system date to US format.
    Without seeing that it would have taken me a lot longer to spot my simple mistake.

    Thanks for the assist my friend.
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

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

Similar Threads

  1. Adding a Cell Range to a String Variable
    By RunTime91 in forum Access
    Replies: 3
    Last Post: 01-27-2018, 02:38 PM
  2. Clear Cell Range Based on Text in Another Cell
    By Oxygen Potassium in forum Access
    Replies: 3
    Last Post: 08-20-2017, 08:12 PM
  3. get automated email based on calendar time
    By chris007 in forum Access
    Replies: 3
    Last Post: 06-23-2016, 08:30 AM
  4. Replies: 4
    Last Post: 06-18-2013, 08:50 PM
  5. Replies: 1
    Last Post: 05-31-2013, 02:04 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