Search code examples
ms-accessdatetimepickerms-access-2003

DateTime picker control, problematic behavior


A datetime control on a form, bound to a table field, works fine.
If I add the picker inside a tab control it raises this error when I load the form:

An error occured in a call to the Windows Date and Timer Picker control.

Is any workaround for this problem?


Solution

  • if you are initializing the value of the DTPicker and it's not visible you'll get that error:

    // a shortcut to get it visible if it's not in the selected tab:
    
    DTPicker.SetFocus
    DTPicker.Value = Now