Acess, How do I make a date"The first Day of this month" and Last

R

Randy

I am trying to set the default date value in an Unbound box, "The First
MM/DD/YYYY of This Month" and in another Unbound box, "The Last MM/DD/YY of
This Month" (What ever the month happens to be). Any suggestions? Please Help.
 
R

Rick Brandt

Randy said:
I am trying to set the default date value in an Unbound box, "The First
MM/DD/YYYY of This Month" and in another Unbound box, "The Last MM/DD/YY of
This Month" (What ever the month happens to be). Any suggestions? Please Help.

FirstOfThisMonth: DateSerial(Year(Date()), Month(Date()), 1)

LastOfThisMonth: DateSerial(Year(Date()), Month(Date()) + 1, 0)
 
J

John Vinson

I am trying to set the default date value in an Unbound box, "The First
MM/DD/YYYY of This Month" and in another Unbound box, "The Last MM/DD/YY of
This Month" (What ever the month happens to be). Any suggestions? Please Help.

DateSerial(Year(Date()), Month(Date()), 1) is the first day of the
month; DateSerial(Year(Date()), Month(Date()) + 1, 0) is the last.

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Top