Creating Query

  • Thread starter Thread starter dmann7
  • Start date Start date
D

dmann7

Guest
Please Help

I have a table in my database that have members with credit cards like account with expiration dates. These account are ether flaged A (for Active) or D (for Deleted) How do I create a query that will show me all the expired active cards based on computer's date

Thanks
 
I am not so sure what you are trying to do here, but if I got it right , you have a table with 2 (or more) fields card_status and card_expire_date
the card_status can have the following value (active or deleted).


To create the query, select the fields you want , under card_stauts you have "active" as criteria and thereafter place this: DateDiff("d",[field].[date],Date())
as a new field name in the query and as a criteria for that field you have: > 0

this basically compares the cards exprie date with todays date, if the diffrence is bigger than 0 (that is, the card expire date less than today) then true.
hope this make some sense to you ....


----------------------------------------
RUC
Read & Understand & Code The problem
 
Last edited:
Or just create a select query and in the criteria for the expration date put this:
<Now()

Run it, and that will display all cards with expirations dates earlier than today's date (and current time).
 

Users who are viewing this thread

Back
Top Bottom