set DateTimePicker value to null issue

I

iccsi

I have a Date Time Picker on the form with check box true, and use
following code on FormLoad in an unbound control

dtpMyDateTimePicker = null


I get no current record error when open the form.
It works if I remove the code, but the control has value on it.

I tried to pur null value on the date time picker, because this is a
criteria filter for the form.


Any information is great appreciated,
 
M

Mike Painter

iccsi said:
I have a Date Time Picker on the form with check box true, and use
following code on FormLoad in an unbound control

dtpMyDateTimePicker = null


I get no current record error when open the form.
It works if I remove the code, but the control has value on it.

I tried to pur null value on the date time picker, because this is a
criteria filter for the form.


Any information is great appreciated,

Setting something equal to Null is never a good idea.
Null is not even nothing. Use a zero or empty string for that.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top