How can I query an access database for all records not past their expiration date?
I’m not trying to set up a complex database, just trying to set up a household coupon management database. I can’t figure out how to run a query so that it will only show records that are not expired (I have their expiration dates as a field in the original table). Any ideas?
If you are using MS Access, there are two ways this can be done. What you do is start a new query in design mode. Select your fields that you want to see in the results. Then in the expiration date column, set the criteria to the following:
>Now()
This will show all records in which the date is after today’s date. You can also put this:
>[Enter Date]
and this will prompt you for a date when you run the query. Good Luck and I hope this helps.
I am not an expert on Access (well, I rarely use it) but I think you can try querying it with SQL. Use this:
SELECT * FROM couponTable WHERE expirationDate > current_date
you use that query exactly, but you may need to change "couponTable" and "expirationDate" to their corresponding fields
References :
Me. I use SQL a lot to interrogate my databases.
If you are using MS Access, there are two ways this can be done. What you do is start a new query in design mode. Select your fields that you want to see in the results. Then in the expiration date column, set the criteria to the following:
>Now()
This will show all records in which the date is after today’s date. You can also put this:
>[Enter Date]
and this will prompt you for a date when you run the query. Good Luck and I hope this helps.
References :
10+ years in designing Access Databases