Solved

Date Picker Control - Locking/Unlocking

Posted on 2000-03-28
6
407 Views
Last Modified: 2013-12-25
How do you lock/unlock the Date Picker Control?  There is no LOCKED property for the Date Picker Control.

Sheila
0
Comment
Question by:baileys
  • 3
  • 2
6 Comments
 
LVL 20

Expert Comment

by:hes
ID: 2665606
To lock the date use the following

DTPicker1.MaxDate = Now
DTPicker1.MinDate = Now

or instead of Now the date you want it locked to.

To unlock

DTPicker1.MaxDate = "12/31/9999"
DTPicker1.MinDate = "01/01/1601"
0
 

Author Comment

by:baileys
ID: 2665719
That works to lock the control, but I also want to disable the dropdown calendar.

Sheila
0
 
LVL 20

Accepted Solution

by:
hes earned 100 total points
ID: 2665735
dtpicker1.UpDown =True
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 2

Expert Comment

by:damienm
ID: 2668998
Why don't you set the datepickers enabled property to false.

dtPicker.enabled = false
0
 

Author Comment

by:baileys
ID: 2671518
If I set the enabled to false, the dates are shaded.
0
 

Author Comment

by:baileys
ID: 2671522
Thanks, that worked.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now