Format Time field with AM/PM (1 Viewer)

oleronesoftwares

Passionate Learner
Local time
Today, 03:32
Joined
Sep 22, 2014
Messages
1,159
the format displays beautifully in the form but when I click into the field it will display the full date (I only wish to see the time). Is there any way around this?
You can set the Locked property to Yes
or the Enabled property to No // This i prefer over Locking it.
 

bastanu

AWF VIP
Local time
Today, 03:32
Joined
Apr 13, 2010
Messages
1,402
You can set the Locked property to Yes
or the Enabled property to No // This i prefer over Locking it.

??? why ??? where did you get any hint that the OP needs this locked\disabled?
 

Kayleigh

Member
Local time
Today, 11:32
Joined
Sep 24, 2020
Messages
706
Sorry input mask is not helping to hide the date when the user clicks INTO THE FIELD. They initially add the time using a custom time selector or typing in but if they wish to modify it will display the full long date which can be confusing. Any other options here?
 

bastanu

AWF VIP
Local time
Today, 03:32
Joined
Apr 13, 2010
Messages
1,402
Tested the code posted below and seems to work:
Code:
Private Sub TestDate_Enter()
Me.TestDate.Format = "Medium Time"
End Sub

I would use this together with the input mask.
 

Kayleigh

Member
Local time
Today, 11:32
Joined
Sep 24, 2020
Messages
706
Nope. Unfortunately it is still displaying the full date.
 

bastanu

AWF VIP
Local time
Today, 03:32
Joined
Apr 13, 2010
Messages
1,402
OK, then you can try the approach I use in the attached file. Import the module and the pop-up form and add code to the double-click event of the time textboxes as shown in the test form.
Let me know if that would work for you.
Cheers,
Vlad
 

Attachments

  • popEditor.mdb
    336 KB · Views: 72

Users who are viewing this thread

Top Bottom