Input mask

J

Jac Tremblay

Hi,
In the table definition, what does the input mask be used for?
I want to store a visa card number and set "0000\ 0000\ 0000\ 0000;1;" as
input mask on the client table.
If I input a visa card number on a form, nothing happens. The number does
not display as "1234 1234 1234 1234" like it should.
Is the input mask property in a table definition useless or it it used in
the wrong way?
Any help will be appreciated.
Thanks.
 
P

Paolo

Hi Jac Tremblay,

put your input mask on the field where you input the data and everything
will be fine.

HTH Paolo
 
P

Paolo

No, it's not useless, if you input the data on the table you will have your
input mask. The point is that if you input the data on a form, the form don't
inherit the input mask from the table because it's just an input mask.
In your case, where you input the data on the form, as you said is useless
to define an input mask on the table.
If you find my post useful please rate them by clicking yes at the bottom of
the window.

Bonne journée. Vue les noms de vôtre masques, je crois bien que vous êtes
français.

Paolo
 
J

John Spencer

If you want to store the data WITH the spaces you need to change your input
mask to force the spaces to be saved to the field.
From the help
Second argument: Specifies whether Microsoft Access stores the literal display
characters in the table when you enter data. If you use 0 for this section,
all literal display characters (for example, the parentheses in a phone number
input mask) are stored with the value; if you enter 1 or leave this section
blank, only characters typed into the control are stored.
0000\ 0000\ 0000\ 0000;0;

If you want to store the data without the spaces, then you need to use the
FORMAT property (or function) to force the display to show the spaces. You
could use the format of
"0000\ 0000\ 0000\ 0000"
Although I would use
"@@@@\ @@@@\ @@@@\ @@@@"
as that will show missing characters as blanks. You might not need to worry
about that as long as you always type the data into the field or into a
control bound to the field. If you could add the data via some other method
then it would be possible to get faulty data into the field.

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
 
P

Paolo

Yeah, sure in this post there aren't forms names...
I was thinking to your other post that I answered but I wrote the thing
about forms in this one... It was friday and my mind was tired...:)

Cheers Paolo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top