number of digits

G

Guest

Hi,

I have a text field that is meant for entering credit card numbers. Credit
card numbers can have either 12 or 16 digits. How do I modify the field so
that 12 or 16 digits are acceptable? Right now, the field requires 16 digits
w/ dashes.

Thank you,
Diana
 
F

fredg

Hi,

I have a text field that is meant for entering credit card numbers. Credit
card numbers can have either 12 or 16 digits. How do I modify the field so
that 12 or 16 digits are acceptable? Right now, the field requires 16 digits
w/ dashes.

Thank you,
Diana

Set the Control's validaton Rule property to:
Len([ThisFieldName]) Between 12 and 16
 
G

Guest

Thank you Fred,

The only problem is that the code from your post is not compatible with my
input mask: 0000\-0000\-0000\-0000

When people enter data into the field, I would like both
0000\-0000\-0000\-0000 and 0000\-0000\-0000 to be acceptable.

The numbers would appear as 1111-1111-1111-1111 and 1111-1111-1111 formats.

Do you know how to get both formats to work for one field?

Thanks,
Diana

fredg said:
Hi,

I have a text field that is meant for entering credit card numbers. Credit
card numbers can have either 12 or 16 digits. How do I modify the field so
that 12 or 16 digits are acceptable? Right now, the field requires 16 digits
w/ dashes.

Thank you,
Diana

Set the Control's validaton Rule property to:
Len([ThisFieldName]) Between 12 and 16
 
F

fredg

Thank you Fred,

The only problem is that the code from your post is not compatible with my
input mask: 0000\-0000\-0000\-0000

When people enter data into the field, I would like both
0000\-0000\-0000\-0000 and 0000\-0000\-0000 to be acceptable.

The numbers would appear as 1111-1111-1111-1111 and 1111-1111-1111 formats.

Do you know how to get both formats to work for one field?

Thanks,
Diana

fredg said:
Hi,

I have a text field that is meant for entering credit card numbers. Credit
card numbers can have either 12 or 16 digits. How do I modify the field so
that 12 or 16 digits are acceptable? Right now, the field requires 16 digits
w/ dashes.

Thank you,
Diana

Set the Control's validaton Rule property to:
Len([ThisFieldName]) Between 12 and 16

And where in your original message did you mention Input Mask?:-(

I would suggest you click on the control's input mask property line
and press F1 to get to the Input Mask help.
Read about the use of the various mask place holders.
 

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