Results 1 to 3 of 3
  1. #1
    3 Star Lounger MacroAlan's Avatar
    Join Date
    Feb 2003
    Location
    St Louis, Missouri, USA
    Posts
    254
    Thanks
    6
    Thanked 1 Time in 1 Post

    Make a Default Date (Access 2000 / XP)

    I have a form in which people will key timecard hours. Though they can enter hours for any time period,
    I would like the default to be the previous Friday. It might be DATE()-4 or -3, or -6.

    Is there an easy way?
    Alan

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Make a Default Date (Access 2000 / XP)

    What do you want to happen on a Friday?

    If you want the default to be the Friday before that, use Date()-Weekday(Date(),7)
    If you want the default to be that Friday, use Date()-(Weekday(Date(),7) Mod 7)

    (In code, you can use vbSaturday instead of 7 as second argument to Weekday)

  3. #3
    3 Star Lounger MacroAlan's Avatar
    Join Date
    Feb 2003
    Location
    St Louis, Missouri, USA
    Posts
    254
    Thanks
    6
    Thanked 1 Time in 1 Post

    Re: Make a Default Date (Access 2000 / XP)

    Friday is the last day of each pay period. since they key time on Monday or Tuesday, I want a Friday to show.

    Think you have put me on the right track.
    <img src=/S/clapping.gif border=0 alt=clapping width=19 height=23>
    Alan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •