Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Database Design / May 2005

Tip: Looking for answers? Try searching our database.

Date Format - Credit Card Expiry

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John Smith - 25 May 2005 12:00 GMT
Hi, This should be simple for you guys.

We need to record credit card details including "Expiry Date" in the form of
"DD/YY".

How do we best format the field for easy entry AND validation (i.e. as a
date field and not just as a text field) without having to enter anything
other than just the month and year and with the result not showing up as
day, month year?

Please help as it is driving me nuts.
Alex White MCDBA MCSE - 25 May 2005 12:08 GMT
Don't use a date field, use a string and validate the format are you sure
it's DD/YY rather than MM/YY, the other thing would be use a date field and
always set the day to 01 because you never need it, it should not be a
problem and on your screen always display MM/YY so dropping the day portion
on the screen and any reports.

Signature

Regards

Alex White MCDBA MCSE
http://www.intralan.co.uk

> Hi, This should be simple for you guys.
>
[quoted text clipped - 7 lines]
>
> Please help as it is driving me nuts.
John Smith - 25 May 2005 12:36 GMT
I guess it would help if I could type - yes I do mean MM/YY of course.

Can you explain what you mean by "always set the day to 01" how do I do this
in the table design or is this effected in the form?

Thanks for helping.

> Don't use a date field, use a string and validate the format are you sure
> it's DD/YY rather than MM/YY, the other thing would be use a date field
[quoted text clipped - 13 lines]
>>
>> Please help as it is driving me nuts.
Alex White MCDBA MCSE - 25 May 2005 12:54 GMT
Hi John,

I have done a bit of testing I think using the date field type is not going
to yield the results you want, either use a text field type with a length of
4 with a format of "99/99" and an input mask of 99/99 or think about
splitting the month and year into 2 different fields, 1 for month and 1 for
year both text length 2,

Signature

Regards

Alex White MCDBA MCSE
http://www.intralan.co.uk

>I guess it would help if I could type - yes I do mean MM/YY of course.
>
[quoted text clipped - 20 lines]
>>>
>>> Please help as it is driving me nuts.
John Smith - 25 May 2005 13:41 GMT
Some things just aren't simple are they.

I can see your point of a text field (length 4 or 5 to accomodate the "/"
?).

I would then need to validate the last two characters against the current
year and then possibly the first two against the current month.

Thanks for all your input.

> Hi John,
>
[quoted text clipped - 28 lines]
>>>>
>>>> Please help as it is driving me nuts.
Rick B - 25 May 2005 17:01 GMT
John:

Personally, I have done this with TWO text fields.  I created a drop down
list for the 12 months and a drop-down list for the next 15 years.

Signature

Rick B

> Some things just aren't simple are they.
>
[quoted text clipped - 38 lines]
> >>>>
> >>>> Please help as it is driving me nuts.
Alex White MCDBA MCSE - 25 May 2005 17:04 GMT
I think that is the way to go......

Signature

Regards

Alex White MCDBA MCSE
http://www.intralan.co.uk

> John:
>
[quoted text clipped - 50 lines]
>> >>>>
>> >>>> Please help as it is driving me nuts.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.