[RESOLVED] A quick date Picker Question.
Hello
In my VB6 program I have a text box that is populated by a date picker.
When the form loads the date picker is set to Now.
On the change event, of the date picker, I let the text box = date picker.value, however if the user clicks on todays date within the picker, which is the default value, the text box is not poplated. Anyway around this?
Thanks
Kev. :eek2:
Re: A quick date Picker Question.
In the _CloseUp event procedure you can place the same code in there too to populate the textbox upon closing of the dtp.
Re: A quick date Picker Question.
Thanks RobDog888, works like a charm.
Kev.
Re: [RESOLVED] A quick date Picker Question.
It's an optional field used in a search, if the text box is empty then no date in the search criteria.
Kev.
Re: [RESOLVED] A quick date Picker Question.
The dtp also supports Null dates. Set the CheckBox property to True. There will appear a small checkbox on the left side of the dtp. If they select a date then its checked. If they dont want a date then unchecked it. No textbox needed then ;)
Re: [RESOLVED] A quick date Picker Question.
Quote:
Originally Posted by Kev
It's an optional field used in a search, if the text box is empty then no date in the search criteria.
Kev.
If you put a msgbox in the Change event, and click on today's date, the message box isn't displayed. For some reason, when you select today's date, the change event doesn't fire. I think it is because the date picker doesn't recognize today's date as a Change.
Anyway, I usually place today's date in my textbox in the Form_Load. That way, if today's date is desired, no selection needs to be made.
Re: [RESOLVED] A quick date Picker Question.
I didn't know about the check box property and Null dates, thanks again.
Hack, the reason I leave the text box empty is that todays date is relevent in the search. I only want to use a date if the user enters one.
Thanks gain though.
Kevin.