Clearing the date on DateTime Control

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to be able to use the date time control and query the database
for a specific person. If the person has a record, I want to display the
date associated with this in the DT control, if they don't, I'd like to have
the DT control be blank. Is this possible? If not, I can just change to
textboxes and have the user type in the date, I just thought the DT picker
would be best.

Thanks,
Emily
 
The problem, is that if the person currently has no date specified, the user
will probably want to use today's date. If I show today's date it will lead
them to believe that date has already been entered.

Thanks,
Emily
 
Apparently you can enable a checkbox, when this is set to true then the value
of the datepicker can be set to null.
Maybe this is an option.

DTPicker0.CheckBox = True
DTPicker0.Value = Null
 
Thanks for the advice, but I tried it and didn't like the way it worked
because it still shows the date, it is just greyed out. I'll probably just
switch to text boxes and let the users input unless I get a better idea.

Thanks,
Emily
 
You can actually set just a textbox and next to it a datepicker which is only
showing the arrow.

Then you only have to handle the afterupdate events to synchronise the
textbox with datepicker and viceversa
 
Thanks for the good idea. I'm giving it a try now, but it looks like it will
work.

Thanks,
Emily
 
Back
Top