By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,652 Members | 1,911 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,652 IT Pros & Developers. It's quick & easy.

Setting the Valid From and Expiry Date of Credit Cards

P: 43
Hi,
I am building a system that will store credit card details in Access but am having problems setting the Format and Input Mask so it is MM/YY, I have read a previous post but it did not give a solution that was feasible for validation tests.
Any Ideas anyone, all help is much appreciated.
TIA
Feb 27 '07 #1
Share this Question
Share on Google+
7 Replies


ADezii
Expert 5K+
P: 8,607
Hi,
I am building a system that will store credit card details in Access but am having problems setting the Format and Input Mask so it is MM/YY, I have read a previous post but it did not give a solution that was feasible for validation tests.
Any Ideas anyone, all help is much appreciated.
TIA
Setting the Data Type to Text and the Input Mask to 00\/00 would work but I'm not sure if this would be feasible for your circumstances.
Feb 28 '07 #2

NeoPa
Expert Mod 15k+
P: 31,263
Try 00/00;0 as your Input Mask.
As far as I'm aware, this should work on Date fields too although I'm not positive. Try it out.
Mar 2 '07 #3

NeoPa
Expert Mod 15k+
P: 31,263
Thinking about it, if it's for a credit card system you probably want it in text (string) form anyway.
Mar 2 '07 #4

P: 43
Thinking about it, if it's for a credit card system you probably want it in text (string) form anyway.
Hey guys, many thanks for your replies, they have been very helpful. Why would I want it in text NeoPa?
Thanks again
Edd
Mar 5 '07 #5

P: 43
Just to give you couple extra details, I do not need to process this information in any way as it is read off the screen and entered into a different machine so that is not important. I would just like it validated so it isn't allowed to enter a certain date in it but only with MM/YY not DD/MM/YY.
Many thanks agin
Edd
Mar 5 '07 #6

ADezii
Expert 5K+
P: 8,607
Just to give you couple extra details, I do not need to process this information in any way as it is read off the screen and entered into a different machine so that is not important. I would just like it validated so it isn't allowed to enter a certain date in it but only with MM/YY not DD/MM/YY.
Many thanks agin
Edd
Under your circumstances, it seems as though Text would be a good Option for Data Type.
Mar 5 '07 #7

NeoPa
Expert Mod 15k+
P: 31,263
Just to give you couple extra details, I do not need to process this information in any way as it is read off the screen and entered into a different machine so that is not important. I would just like it validated so it isn't allowed to enter a certain date in it but only with MM/YY not DD/MM/YY.
Many thanks agin
Edd
I said that as I could see no reason for storing it as a date and complicating your processing.
Validation, however, does change things somewhat. On balance, I'd still keep it as text but do some VBA validation in the BeforeUpdate event procedure to check that "1/" & control is a valid date (assuming British date layout - Otherwise it's more fiddly but check the data after formatting it as a date with a day part associated).
Does that help?
Mar 5 '07 #8

Post your reply

Sign in to post your reply or Sign up for a free account.