Set date to Date and time picker

R

Roy Goldhammer

Hello there

I have access application with Date and time picker object inside.

I can bound it to table. But i can't set value to it.

I tried this
Sub Form_Load()
me.txtArrivalDate = "07/01/2005" 'July the first
End Sub

I got this error: Date and time picker error: Property is read-only

How can i set value to date and time picker?
 
M

missinglinq via AccessMonster.com

I'm confused, Roy! You appear to be trying to set a default date to your
Date/Time picker, but you're trying to assign a date to a textbox control. If,
in fact, you're trying to set a value to the date picker, try this, where

YourDatePickerName

is the actual name of your date picker.
Private Sub Form_Load()
Me.YourDatePickerName ="07/01/2005"
End Sub
 

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