Solved

Date control

Posted on 2000-03-07
5
149 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
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…

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