Solved

Date control

Posted on 2000-03-07
5
150 Views
Last Modified: 2010-05-02
I need a control (similiar to the dtPicker) that has the ability to use a calendar to pick a date, or type the date with both input mask and formating that can be allowed to be left blank.  The dtPicker has that annoying check box if you want to leave it blank.  Any other options out there?

Thanks for the gumball mickey!
0
Comment
Question by:JimBre
5 Comments
 
LVL 4

Expert Comment

by:wesleystewart
ID: 2592320
Can you just have a text box on the form along with a calendar control?  In the after_update event of the calendar control you can write its value to the text box.  OR, you user can just type the date in the text box, and use can use it's properties to determine the input mask and/or format.  Whatever process you are driving with your date criteria can be modified to allow a null value in the text box.

This would keep you from having to add another control . . .

Wes
0
 
LVL 18

Accepted Solution

by:
mdougan earned 50 total points
ID: 2592356
I did what wesley first suggests, and it works resonably well.  One very annoying thing about the dtPicker control is that I was trying to set the .Value property in the drop_down event, or the get_focus event (or any of the dtPicker's events) to initialize the calendar to be positioned on the date that I wanted to display.  However, setting the date value in any of the dtPicker's events was too late!  So, I had to set the dtPicker's value in the events of some other control.  

Now, if the user types a date into the textbox I've associated with the dtPicker control, then if it's a valid date, I set the dtPicker's value.  Also, at form load, I give the dtPicker a default value of the current system date, otherwise, it will always display the date that you added the dtPicker to your form!

It's a bit more work, but now I have optional dates, without having to use that horrendous checkbox.
0
 
LVL 1

Expert Comment

by:prozak
ID: 2593170
Check out http://www.shersoft.com/ We use the Calendar Widgets and they have a great date combo that does just what you said.
0
 

Expert Comment

by:vfinn
ID: 2596943
You could try the common controls replacement date time picker
http://www.mvps.org/ccrp/

I'm not sure if this has a fix for your problem but it is better than the default date time picker
0
 

Author Comment

by:JimBre
ID: 2748210
Sorry it took so long to get back to. Thanks for the help.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

896 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

15 Experts available now in Live!

Get 1:1 Help Now