Query Criteria to Identify Expired Credit Cards

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts

  • sharsy
    Guest replied
    Re: Query Criteria to Identify Expired Credit Cards

    Yeah I just tried that but it doesn't seem to work - it displays dates
    but they don't match up to the expiry date. Also, it seems to allocate
    a specific date (ie. the 19th or 31st) which is not relevant for the
    purposes I need it for - It would be fine if they were all allocated a
    date of the 1st (e.g. 01/05/08) because then they would still be equal.

    Leave a comment:


  • Salad
    Guest replied
    Re: Query Criteria to Identify Expired Credit Cards

    sharsy wrote:
    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 [C/Card Expire] 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
    come up with criterion that looked at the year first...
    >
    Any help would be greatly appreciated!!!
    >
    Kind regards,
    >
    sharsy
    Maybe this concept will help. This was done from the debug/immediate
    window.
    ? cdate("03/2013")
    3/1/2013
    ? cdate("03/2013") < #3/1/2013#
    False
    ? cdate("03/2013") = #3/1/2013#
    True
    ? cdate("03/2013") #3/1/2013#
    False

    OK, so you can create a "calculated " field in a query. Your field is
    called [C/Card Expire]. Not the way I'd name a field but if you like
    your naming scheme more power to you.

    A calculated query field has these components
    ColumnName : Function/Constant

    In your case
    CCDateFld : Cdate(Left([C/Card Expire],3) & "20" & Mid([C/Card Expire],4))

    Basically I'm creating a date field by adding "20" to the 2 digit year.
    I suppose you can use an IIF() statement if you need to go back to the
    1900's. This column in your query can then be filtered.

    Water


    Leave a comment:


  • sharsy
    Guest started a topic Query Criteria to Identify Expired Credit Cards

    Query Criteria to Identify Expired Credit Cards

    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 [C/Card Expire] 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
    come up with criterion that looked at the year first...

    Any help would be greatly appreciated!!!

    Kind regards,

    sharsy
Working...