Painful InputMasks (1 Viewer)

penfold1992

Registered User.
Local time
Today, 17:43
Joined
Nov 22, 2012
Messages
169
I have a field that requires a full date including a time stamp.
ie. 05/12/12 14:20
the Input Mask i have used is:
00/00/00\ 00:00;0;_

There are a few issues I have with it...

firstly, when I try to change the value (after I have de-selected from the cell once already) by for example... changing the above date to:
06/12/12 14:20
by putting my cursor after "5" pressing backspace and then entering 6...
I get a error "The value you entered isn't appropriate for the input mask '00/00/00\ 00:00;00_' specified for this field.

why does it say this when the input is conforming to the input mask?
 

MStef

Registered User.
Local time
Today, 17:43
Joined
Oct 28, 2004
Messages
2,251
Put blank i INPUT MASK properties, and put
NOW in DEFAULT VALUE properties.
For that field i the table DATA TYPE put DATE/TIME,
in Format properties put GENERAL DATE.
 
Last edited:

penfold1992

Registered User.
Local time
Today, 17:43
Joined
Nov 22, 2012
Messages
169
The value of the field isnt "now" its whatever the user records... the times and dates are not just the time and date now (it doesnt fill the box with anything anyway)

but this doesnt give an input mask so you are still relying on people to keep the same date format... the Input mask is still a better option then just leaving it as a free form date in terms of consistancy.

its just that there are some annoying issues with it... the input mask works but not all the time.

I think its because it "adds" the seconds when you enter the value.

If you could "remove" the seconds when you are on edit... that would fix it
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 12:43
Joined
Feb 19, 2002
Messages
29,501
the Input mask is still a better option then just leaving it as a free form date in terms of consistancy.
Not for dates. If the control is bound to a date field, Access will not allow an invalid date to be entered. Using an input mask prevents the automatic date picker from popping up on A2007 and A2010 forms. If you click into the field rather than tabbing into it you could end up in the middle of the field and you will have trouble getting the data entered.
 

penfold1992

Registered User.
Local time
Today, 17:43
Joined
Nov 22, 2012
Messages
169
yes... but the date picker isnt as good if you also need to type in a time too.
the users get given a date which they must enter (they use the date and time stamps of an email as reference)
In this situation to type in 06/12/12 2:51
the user just types 061212251 the / and " " is automatic.

the simple answer seems to be "this is why input masks suck" and "this is why input masks can be useful"
 

NeutronFlux

Registered User.
Local time
Today, 12:43
Joined
Aug 20, 2012
Messages
78
yes... but the date picker isnt as good if you also need to type in a time too.
the users get given a date which they must enter (they use the date and time stamps of an email as reference)
In this situation to type in 06/12/12 2:51
the user just types 061212251 the / and " " is automatic.

the simple answer seems to be "this is why input masks suck" and "this is why input masks can be useful"
Personally, I like to separate Date and Time into two fields just to save myself from these types of complications. Not sure if that's an option for you?
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom