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
Solved

Date control

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

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…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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…
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…

839 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