Medium Time Input Mask (1 Viewer)

rgwfly

Registered User.
Local time
Today, 15:58
Joined
Jun 7, 2016
Messages
49
Hello experts. I inherited a problem in a database that tracks safety incidents. User inputs data from a form that is handed in. the issue is with the medium time format.
Table consist of,
Data Type: date/Time
Format: Medium Time
Input Mask: 99:00\>LL;0:# this is the Microsoft default.
The table seems to only be allowing "PM" times only?
whenever I input an AM time I get an error
"One or more values are prohibited by the validation rule'[when-time]' set for table......
Seems like an easy fix
This is not my database and data entry is direct table entry. Just trying to help a coworker out.
I could redo this using forms but just looking to get her by for now.

Thanks
 

Gasman

Enthusiastic Amateur
Local time
Today, 23:58
Joined
Sep 21, 2011
Messages
14,218
Hmm, if you use the wizard and test 09:00 AM that works in builder, yet when it is in the table it does not.

FWIW I have used
00:00;0;_
in mine, but then I enter and expect 09:00, or 18:45

so i'd be curious now as to why it works in the builder, but then not in the form?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 06:58
Joined
May 7, 2009
Messages
19,227
I think the mask is obsolete just format the textbox as short time on the form and on the table.
 

mike60smart

Registered User.
Local time
Today, 23:58
Joined
Aug 6, 2017
Messages
1,913
Hi

Medium Time Mask as follows works for me:-

00:00\ >LL;0;_
 

Gasman

Enthusiastic Amateur
Local time
Today, 23:58
Joined
Sep 21, 2011
Messages
14,218
That is what the mask wizard generates, but it still does not work in a form for me.

However I have discovered that if I view the table in datasheet view and enter a time, it quite happily accepts it?


Hi

Medium Time Mask as follows works for me:-

00:00\ >LL;0;_
 

mike60smart

Registered User.
Local time
Today, 23:58
Joined
Aug 6, 2017
Messages
1,913
Hi Gasman

I used the wizard also and it works just fine entering a time in the table and also in the Form as shown below:-

Time.JPG
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 23:58
Joined
Sep 12, 2006
Messages
15,634
it's possibly not the mask. Maybe the issue is the time that is being entered.

I jsut tested a bound time/date field (short time, but that's just the display format, not the actual data entry)

The time is displayed with a colon separator, although I just tested and it seems to accept other separators with perhaps unexpected results.
A period/full stop works the same as a colon.

I just tried entering a comma and 1,3 is a date 1/3/18
1.00pm shows as 13:00

Any time outside a 24 hour clock is rejected. so 24:00 is not accepted, and 12:75 is not accepted.
 

Gasman

Enthusiastic Amateur
Local time
Today, 23:58
Joined
Sep 21, 2011
Messages
14,218
I don't know what to tell you.
I am only trying 09:00 and 09:00 AM and each is rejected.

I have only used short time in my databases, but was keen to see the difference.

I have just created a new database and used the mask created by the wizard. Now it works?:banghead:

However not having used it before, in the first database I would get to see the > of the mask?, in the new DB I do not.
 

Attachments

  • time mask.PNG
    time mask.PNG
    932 bytes · Views: 183

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 23:58
Joined
Sep 12, 2006
Messages
15,634
I had no problem with 9:00 PM, 9:00pm, or 21:00

All showed as 9:00 PM

Maybe if you have a mask, you aren't able to enter the AM or PM because of the input mask. As I say, I don't use input masks.
 

Gasman

Enthusiastic Amateur
Local time
Today, 23:58
Joined
Sep 21, 2011
Messages
14,218
Dave,
In the second DB the control is empty, in the first you get to see part of the mask, so I think that is causing the problems. I hardly use a mask either, but I was just keen to see what it would produce for me.?

The strange thing is that I can test in the wizard no problem, and copy result to the mask, but then it fails in that first DB.

Probably same thing is happening to the O/P?

I had no problem with 9:00 PM, 9:00pm, or 21:00

All showed as 9:00 PM

Maybe if you have a mask, you aren't able to enter the AM or PM because of the input mask. As I say, I don't use input masks.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 17:58
Joined
Feb 28, 2001
Messages
27,129
I have just created a new database and used the mask created by the wizard. Now it works?

Works in one place but not in the other? If you "normalize" the windows for the two databases, you should be able to pull up a Properties display for the corresponding controls and view them side-by-side. Then do the same for the underlying bound field. That should help you to see any definition differences. You can also bring up the File>>Options list for "current database" and compare those items.

If there are still no differences, it would make me think "corruption" of some sort. Have you done a Compact & Repair on the miscreant database recently?
 

Gasman

Enthusiastic Amateur
Local time
Today, 23:58
Joined
Sep 21, 2011
Messages
14,218
Hi Doc,
Yes I tried a Compact & Repair with no result. I have done as you suggested however, and discovered that a space was missing in the mask 00:00\>LL
Also I discovered it will also work without the \

This was not my problem, I was just curious, and I always enter my times in 24hour notation.

I have also noticed that is generates 00:00\ >LL;0;_ not 99:00\>LL;0;_ as the O/P posted.
 

rgwfly

Registered User.
Local time
Today, 15:58
Joined
Jun 7, 2016
Messages
49
Sorry I was offline for much of the discussion. I ended up creating a new field and used the input mask given by Mark60 and it works perfect.
I tried it in the original field and it fails. Also tried C&R a few times. Kind of strange like the field is totally corrupt. I am just going to use the new field and modify the queries as needed. Good discussion.
Thanks ALL
 

Gasman

Enthusiastic Amateur
Local time
Today, 23:58
Joined
Sep 21, 2011
Messages
14,218
That was pretty much my experience, but I had created both controls and used the wizard each time. Very strange. :banghead:
Sorry I was offline for much of the discussion. I ended up creating a new field and used the input mask given by Mark60 and it works perfect.
I tried it in the original field and it fails. Also tried C&R a few times. Kind of strange like the field is totally corrupt. I am just going to use the new field and modify the queries as needed. Good discussion.
Thanks ALL
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 23:58
Joined
Sep 12, 2006
Messages
15,634
Sorry I was offline for much of the discussion. I ended up creating a new field and used the input mask given by Mark60 and it works perfect.
I tried it in the original field and it fails. Also tried C&R a few times. Kind of strange like the field is totally corrupt. I am just going to use the new field and modify the queries as needed. Good discussion.
Thanks ALL

was the original control definitely bound correctly? ie, bound to a date field, with nothing funny in the format type properties
 

rgwfly

Registered User.
Local time
Today, 15:58
Joined
Jun 7, 2016
Messages
49
was the original control definitely bound correctly? ie, bound to a date field, with nothing funny in the format type properties
I believe so it was using direct table entry and not a form. I did try all the formats mentioned above. What's funny is I created a new field and deleted the old field. when I tried to rename the new field I got the errors again until I change it back. I still get e brief error looking for the field upon initial record add but it lets me proceed. I cannot spend much time due to other priorities. I would redo the whole dbase if time consideration was not an issue.
 

Users who are viewing this thread

Top Bottom