Solved

Date control

Posted on 2000-03-07
5
154 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

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…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…

749 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