473,394 Members | 2,160 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Input mask for credit card date

43
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
Mar 5 '07 #1
3 7260
ADezii
8,834 Expert 8TB
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
Mar 5 '07 #2
xian2
43
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
Mar 5 '07 #3
MyTech
1
I wanted to enter in my "Credit card expiration date" text box, just the month and the year. I don't care about the day.
Here's how I did it.


1. Field Name: "Exp".

2. In form, select "Exp" and create an 'After Update' Following macro.
SetTempVar: OD, Day([exp])
SetTempVar: OM, Month([exp])
SetValue: CDate([TempVars]![om] & "/" & ([TempVars]![od]+2000))
RemoveAllTempVars

('OD' stands for 'Old Day' and 'OM' stands for 'Old Month')
3. Format (for "Exp"): mm/yy

No need for input mask
Jun 10 '10 #4

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

Similar topics

6
by: Simon Wigzell | last post by:
My client wants to have credit card information fields on his forms for his website visitors to be able to buy his wervices by credit card. The credit card info - Brand, number and expiry date will...
4
by: j.t.w | last post by:
Hi All. I'm having a problem with my Date of Birth textbox. When I open the ..htm file, the "DoB" textbox is flat with a border. All of my other textboxes are sunken and are yellow. When I...
0
by: MattB | last post by:
Hi. I'm on my second redesign of a dynamic form I need to create and I'm looking for good examples and/or suggestions. I have a web application that is being distributed to different clients of...
3
by: Dani | last post by:
We currently have an online form that customers fill out to buy one of our products. After they submit it, it sends them an email containing all the order information including the credit card #. ...
16
by: Filips Benoit | last post by:
Dear all, I have a datefield that sometimes should store hours and minutes too ans use following format and inputmask. dd/mm/yyyy hh\:nn 09/09/0000\ 99:99;0;* Typing date, hour and...
1
by: Jon Peck | last post by:
I'm largely self-taught (so hardly an expert) in Access 2002. I'm wondering if it's possible to have a conditional input mask on a field in a form. My database keeps track of people who register...
1
by: securedcardss | last post by:
http://card.2youtop.info secured credit card card credit instant secured card cash credit secured card
17
by: sharsy | last post by:
Hello guys, I would like some help in generating query criteria that will identify credit cards that have expired on an access database. The specific Field is formatted with a Data Type of...
5
by: snehadulur | last post by:
In the input box if we click ok or cancel the invoice prints. By default the credit card info is 0, and most of the cases its 0 even when we want to take a print out i.e., the value is changed. I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.