Setting current date on date/time picker control

G

Guest

I am trying to set the current date on the Date and Time Picker Control 6.0
(SP4) when I open a form in Access, however when I try to do this using the
code :

dtPicker.Value = DateValue("dd/mm/yy")

I get a "Property is read-only" error when the form opens.

How can I set the value ?

Thanks,

Douglas Main
 
D

David Lloyd

Doug:

The following code seems to work in setting the control to the current date:

Private Sub Form_Load()
DTPicker0.Value = Date
End Sub

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


I am trying to set the current date on the Date and Time Picker Control 6.0
(SP4) when I open a form in Access, however when I try to do this using the
code :

dtPicker.Value = DateValue("dd/mm/yy")

I get a "Property is read-only" error when the form opens.

How can I set the value ?

Thanks,

Douglas Main
 

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