prashs
05-18-2010, 02:56 PM
Hi,
I am using MS Access 2003 with Visual Basic 6.5. I have a Tabbed control on a form. On one page of the form I have a Date Time picker control (DTPicker) configured to show time in 24-hour format (HH:mm). Now when I switch from one tab to another the format of the DtPicker control changes from the "HH:mm" format to the "mm/dd/yyyy" format. I couldn't find why this was happening but to counter this I added the following logic in the "TabCtl12_Change" event handler which is called every time I switch from one tab to another:
Me.Sign_In_HourIn2.CustomFormat = Format(Me.Sign_In_HourIn2.Value, "HH:mm")
Now, by doing this the proper value is shown in the proper format, but the control is locked somehow and I can't change the time value again. I have tried doing the following:
Me.Sign_In_HourIn1.Locked = False
Me.Sign_In_HourIn1.Enabled = True
But this doesn't help.
Does anybody have any suggestion as to what should be done here? Is there any other control that can be used instead of DTPicker.
Thanks!
I am using MS Access 2003 with Visual Basic 6.5. I have a Tabbed control on a form. On one page of the form I have a Date Time picker control (DTPicker) configured to show time in 24-hour format (HH:mm). Now when I switch from one tab to another the format of the DtPicker control changes from the "HH:mm" format to the "mm/dd/yyyy" format. I couldn't find why this was happening but to counter this I added the following logic in the "TabCtl12_Change" event handler which is called every time I switch from one tab to another:
Me.Sign_In_HourIn2.CustomFormat = Format(Me.Sign_In_HourIn2.Value, "HH:mm")
Now, by doing this the proper value is shown in the proper format, but the control is locked somehow and I can't change the time value again. I have tried doing the following:
Me.Sign_In_HourIn1.Locked = False
Me.Sign_In_HourIn1.Enabled = True
But this doesn't help.
Does anybody have any suggestion as to what should be done here? Is there any other control that can be used instead of DTPicker.
Thanks!