MajP
You've got your good things, and you've got mine.
- Local time
- Today, 11:05
- Joined
- May 21, 2018
- Messages
- 9,647
@June7
Your test is correct, but that is not what the OP is doing. As you said if you enter a time component only with no integer portion then when you click in the text box it will only show the time.
However, for some Unexplained reason the OP is entering a date (integer) portion with an integer value of 2.
When you enter 14:00:00 you are saving the value
0.583333333333333
the OP is saving the value
2.583333333333333
?cdate(2.583333333333333)
1/1/1900 2:00:00 PM
?cdate(.583333333333333)
2:00:00 PM
?cdate(0)
12:00:00 AM
?cdate(1)
12/31/1899
?cdate(2)
1/1/1900
@Jen-Jen To ensure you never see a date portion when you click into a cell, on the after update of the field do the following.
The bigger question is why you are adding 2 days.
Your test is correct, but that is not what the OP is doing. As you said if you enter a time component only with no integer portion then when you click in the text box it will only show the time.
However, for some Unexplained reason the OP is entering a date (integer) portion with an integer value of 2.
The OP has a day portion and it is the integer value of 2. Not even 1.And when you go into the table or another datasheet form with those fields, they are showing 01/01/1900 14:00:00
When you enter 14:00:00 you are saving the value
0.583333333333333
the OP is saving the value
2.583333333333333
?cdate(2.583333333333333)
1/1/1900 2:00:00 PM
?cdate(.583333333333333)
2:00:00 PM
?cdate(0)
12:00:00 AM
?cdate(1)
12/31/1899
?cdate(2)
1/1/1900
@Jen-Jen To ensure you never see a date portion when you click into a cell, on the after update of the field do the following.
Me.fieldName = Me.fieldName - int(me.fieldName)
The bigger question is why you are adding 2 days.
Last edited: