date and time picker control 6.0 (sp4) --- MS Access

MUKESHY12390

Well-known Member
Joined
Sep 18, 2012
Messages
901
Office Version
  1. 2013
  2. 2011
  3. 2010
  4. 2007
Platform
  1. Windows
Hi All,

I would like set "Date Picker" default value to today.But every time I open form get error "DTPicker returned the error: Property is read-only."

Any idea or suggestion most welcome.

Code:
'''Access form
Private Sub Form_Open(Cancel As Integer)
Me.DTPicker0.Value = Date
End Sub
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
You might want to delve a little bit into the difference between a form Open event and the Load event. It's a common mistake to try to affect form controls or records in the open event. Think of the form as the trunk of your car and your groceries as control values. You cannot load the groceries until you have completed the open trunk event.

If you can remember that properties of controls (such as their borders, visibility, etc) can be affected during the open event, but their values cannot be programmatically affected in the open event, it will help you in the future.
 
Last edited:
Upvote 0
no doubt it gonna help me in future ...thanks a lot
 
Upvote 0

Forum statistics

Threads
1,215,018
Messages
6,122,703
Members
449,093
Latest member
Mnur

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top