Connecting Tech Pros Worldwide Forums | Help | Site Map

Input mask for credit card date

Member
 
Join Date: Nov 2006
Posts: 43
#1: Mar 5 '07
Hi,
I am trying to validate a credit card expiry date so it is no later than three years ahead of today's date. I am OK with the validation as far as Date()+1096 which is the maximum number of days in three years but I am not sure how you would do this as a credit card expiry date is just MM/YY. I have tried validating MM/YY but apparently you need to do DD/MM/YY in Access so what I would ideally like to do is have 28 as a default day and an input mask so just the month and year can be enetered by the user e.g. 28/MM/YY where the user just clicks on the field and can enter the month and year without having o click at the beginning of M.

Any help is much appreciated.

many thanks in advance

Edd

ADezii's Avatar
Expert
 
Join Date: Apr 2006
Location: Philadelphia
Posts: 5,216
#2: Mar 5 '07

re: Input mask for credit card date


Quote:

Originally Posted by xian2

Hi,
I am trying to validate a credit card expiry date so it is no later than three years ahead of today's date. I am OK with the validation as far as Date()+1096 which is the maximum number of days in three years but I am not sure how you would do this as a credit card expiry date is just MM/YY. I have tried validating MM/YY but apparently you need to do DD/MM/YY in Access so what I would ideally like to do is have 28 as a default day and an input mask so just the month and year can be enetered by the user e.g. 28/MM/YY where the user just clicks on the field and can enter the month and year without having o click at the beginning of M.

Any help is much appreciated.

many thanks in advance

Edd

For what you wish to accomplish, I feel it is best to:
__1 Store the [Expiry Date] As Date/Time
__2 Input Mask: 99/99/00;;_
__3 Format: mm/yy
__4 Validation Rule: <Date()+1096
Member
 
Join Date: Nov 2006
Posts: 43
#3: Mar 5 '07

re: Input mask for credit card date


Quote:

Originally Posted by ADezii

For what you wish to accomplish, I feel it is best to:
__1 Store the [Expiry Date] As Date/Time
__2 Input Mask: 99/99/00;;_
__3 Format: mm/yy
__4 Validation Rule: <Date()+1096

thank you so much for the suggestion, I will try it out as soon as I can find my darn memory stick!

Mant thanks

Edd
Reply