Solved

Date Picker Control - Locking/Unlocking

Posted on 2000-03-28
6
416 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
Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

 
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SSRS expression Issue finding a string 10 91
VB6 ListBox Question 4 49
VB 6 error 5 in windows 10 but not in XP 7 63
VBA - If Bookmark = "XXBOOKMARKXX" then 15 41
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

828 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