Date Range Default value

AnnPhil

Registered User.
Local time
Today, 21:19
Joined
Dec 18, 2001
Messages
246
I have a form with two unbound fields; Begin Date and End Date, is there anyway to have the date range default to the previous month?

Thanks for any suggestions in advance
 
I have a form with two unbound fields; Begin Date and End Date, is there anyway to have the date range default to the previous month?

Thanks for any suggestions in advance

If it is just 2 unbound text boxes, you could just put some code in your forms open or load event that would put in last month's dates, or whatever dates you wanted.

I'm no expert but you could use something simple like:

Me.BeginDate = now() - 31 (or however many days you wanted to go back from today's date.)

Or use the Day/Month/Year functions eg:

Me.BeginDate = Day(Now()) &"/" & Month(Now())-1 & "/" & Year(Now())
 

Users who are viewing this thread

Back
Top Bottom