Datepicker

ehorde

Registered User.
Local time
Today, 01:00
Joined
May 21, 2009
Messages
21
I know there has been lots of posts, but I have searched and can not find anything on my particular issue.

I have a form that launches several reports from command buttons. On this form I have a tow date fields as part of the criteria. I have them set a short date and to use datpicker

I was setting these two fields to default to a 30 day time window. They work in a regular .accdb but once I make it runtime..

One (EndDate) is set to default to "Now()", this always shows the date as two days prior and not the current date.

One (StartDate) is set to default to "Now() - 30", this always set the date back 2 months, not today -30 days.

Anyone know the cure for this?
 
Setting field's mask to "short date" fixed it.
I don't know why...

EDIT....

No, it didn't!!!!!!! Setting the mask to short date fixed the date, but made the datepicker vanish.
Holy smokes! what's up Microsoft?!!!!
 
Last edited:
Found the cure.. 3 part.

1st - created a holding table with two fields set to now() and (now()-30) as the default values.

2dn - bound the form to the holding table

3nd - formated the form's date fields using mm/dd/yyyy (do not use
imput mask!)

This works and was tested.
 
I wouldn't use NOW as it includes time. Use DATE() instead.
 

Users who are viewing this thread

Back
Top Bottom