Results 1 to 2 of 2
  1. #1
    dfean is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Jul 2016
    Posts
    14

    How to add a validation rule for a credit card?

    Hiya,

    I'm trying to in access add a validation rule for the expiry date for a credit card:

    I have come up with this:

    Format: mm/yy
    Input Mask: 99/99
    Validation Rule: <=DataAdd("m", 36, Data())

    I know that this validation rule: <=DateAdd("d",1095,Date())
    works.



    I don't want to include the day, just month and year only.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    You can't. It must be a a whole date so use the 1st of the expired month.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 6
    Last Post: 07-11-2016, 07:38 PM
  2. Replies: 2
    Last Post: 06-16-2015, 03:52 AM
  3. Replies: 2
    Last Post: 08-24-2011, 12:59 PM
  4. Validation Rule Help!
    By confidego in forum Access
    Replies: 8
    Last Post: 07-20-2011, 12:54 PM
  5. Credit Card Info, Where?
    By mastromb in forum Access
    Replies: 3
    Last Post: 05-26-2010, 12:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums