Can't set Value of DTPicker
Posted on 2005-04-03
I have tried setting the value of the DTpicker at runtime using the following statement in the Form_Load procedure:
me.ctlDate.value = Now
I get the error message: Runtime Error :'2763' An error occurred in a call to the Windows Date and Time Picker Control
I have downloaded the latest version of the .ocx file and made sure it was registered correctly. I have read all the other threads and most of them state that if you put the statement in the Load procedure and use the above syntax, it should work. I don't understand why my control isn't working.
I am using this control on a switchboard and therefore do not want or have the ability to assign it's control source to a field in a table. I thought about using a subform that has a date field that is defaulted to the current date and use it as the source but I have no way of linking the parent form to the subform.
Please help - I don't have time on this project to get hung up on this control!
I have since narrowed it down to having something to do with filtering the form at runtime. When I comment out the code that filters the recordset and turn on filtering for the form, it works fine. When I put it back - get the message again.