473,659 Members | 3,162 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Input mask for credit card date

43 New Member
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 7292
ADezii
8,834 Recognized Expert Expert
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 New Member
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 New Member
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))
RemoveAllTempVa rs

('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
3350
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 be sent to the server and stored in the database as the .asp page calls itself on Submit. How secure is this? I've never had to worry about it before but is form information encrypted before being sent to the server? Are there any legal...
4
17584
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 change the name of the "DoB" textbox to something like "Telephone" or "TelephoneBirthdate", the textbox changes to sunken, and yellow. I have tried changing the name to "DBirth", "BirthDate", "Birthday", "cusBirth", "DOBirth", etc. but, the...
0
1169
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 ours and it has a form for people to fill out with their personal information. Right now it's static but I'd like to be able to make it dynamic so a client could just put a list of fields in a web.config key and those would be the fields that...
3
1541
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 #. It currently sends the entire # which we would like to change to xxxx-xxxx-xxxx-1234. Does anyone know how to do this? I don't know asp well enough to know how to change cardno to use the x's instead of the actual #. The current code is: If...
16
12684
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 minutes is OK.
1
4194
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 for a conference. They can pay by credit card (Visa or MasterCard only), check or purchase order. I'd like to be able to have an input mask so that I only have to type the digits (1234567890123456) but the credit card numbers show up with...
1
2960
by: securedcardss | last post by:
http://card.2youtop.info secured credit card card credit instant secured card cash credit secured card
17
5686
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 'Text' and has an input mask of '00/00', so all expiry dates are set out for example as 10/13 (which represents October 2013). I have hada brief go at trying to work it out, but I was unable to
5
5592
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 tried doing If Payment = "" Then Exit sub, but it exits the sub if I press ok or cancel since the credit card value is not changed and remains to be 0. What changes can I make so that if OK is clicked the document prints and if cancel is clicks...
0
8428
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8337
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8851
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8748
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8531
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5650
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2754
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1978
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1739
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.