Date Picker

G

greg

Hi there,

I tried this in the active x group but didn't get a
response. Thank you in advance for any assistance you can
provide.

I am using the MS DatePicker in an application I
have. The control is used on an unbound form to select
the beginning and ending date of a query, which provides
the data for a specific report. Everything works just
fine, except, how can I get the default date to be set to
today? I have used this control on other, "bound forms"
and was allowed to set the date such as Date()+7. Is
there a way to do this on the unbound form? All I'm
looking for is today's date, but the control itself won't
allow that. You can set the actual mm/dd/yy date, but
what I need is for it to be set to today's date.

thank you for any help you can give.

greg
 
N

Newbie

you need to set the value in the OnLoad of the form instead of the onOpen

eg me.dtpicker.value = now()

I think this will include the time so you may wish to format it

HTH
Al
 
H

Henry Smith

Within the ON-Load event of the form set the datepicker vale to the Date
function

me.dtpicker.value = Date

This works for me in many of my forms.

Cheers,
Henry
 
G

greg

Thanks to the both of you for your reply. I set the value
of the field using your suggestion and it worked great.

thanks again.
greg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top