Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB Components
|
VB Components Issues specific to components in VB.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Components section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 21st, 2006, 12:11 AM
Registered User
 
Join Date: Feb 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem with validation technique of DTPicker.


I have a form, which contains a DTPicker and an 'Apply Time' command button. I have set the custom format of the DTPicker to "MM/dd/yyyy HH:mm:ss". The functionality i require is that if the date here is changed the button should get activated.

I already have completed this requirement by enabling the button through the 'Change' event of the DTPicker control. But i observed that if i change the existing date to an invalid date, say for e.g. - 02/36/2006, the DTPicker pauses for almost 2 seconds, during which it validates the date and then if found invalid, it resets the original date back to the DTPicker. In this event, the change event of DTPicker is not called, therefore, the button is not enabled. This is also fine.

But now i want to display a message to the user that he has entered an invalid date when the DTPicker resets the date after validation. I checked out all the events of the DTPicker,but could not locate one which was getting called after / before the value of DTPicker was validated and reset if invalid.

Please do recommend me a solution for this problem.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Replaced DTPicker with text box toddw607 Access 6 February 28th, 2007 08:59 AM
bound DTPicker control-urgent myth12345 VB Databases Basics 0 December 31st, 2004 06:10 AM
DtPicker to the datagrid? drachx General .NET 0 October 19th, 2004 02:26 AM
Using DTPicker leehambly Access 0 September 22nd, 2003 11:16 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.