How can i tag up a record 6 months before it expires

S

Shazza

HI. Using Access 2000.

I need a formula or qurey to flag up records whith Training Certificates
that are about to Expire. I would like to know 6 months before thay expire
so that i can organise new training before the expriry date. Is this
possible?
 
S

Stefan Hoffmann

hi,

I need a formula or qurey to flag up records whith Training Certificates
that are about to Expire. I would like to know 6 months before thay expire
so that i can organise new training before the expriry date. Is this
possible?
Create a query, drag in your date field which holds the date you want to
test for expiration and add this criteria:

<=DateAdd("m", 6, Date())

If you store time parts in this field you need to use extract the date
before. Instead of using the field directly you need an expression like:

FilterDate: Date([yourDateField])

with the above criteria.

As you said you want to flag them, thus means you have a field like

Expired: Yes/No

in your table?

Then you may run this query:

UPDATE yourTable
SET Expired = True
WHERE DateValue(yourDateField) <= DateAdd("m", 6, Date())
AND NOT Expired;


mfG
--> stefan <--
 
S

Shazza

Stefan thats brilliant thank you. i am going to go and test it now :)

--
Thank you for reading my post. Hopefully you can answer my querie


Stefan Hoffmann said:
hi,

I need a formula or qurey to flag up records whith Training Certificates
that are about to Expire. I would like to know 6 months before thay expire
so that i can organise new training before the expriry date. Is this
possible?
Create a query, drag in your date field which holds the date you want to
test for expiration and add this criteria:

<=DateAdd("m", 6, Date())

If you store time parts in this field you need to use extract the date
before. Instead of using the field directly you need an expression like:

FilterDate: Date([yourDateField])

with the above criteria.

As you said you want to flag them, thus means you have a field like

Expired: Yes/No

in your table?

Then you may run this query:

UPDATE yourTable
SET Expired = True
WHERE DateValue(yourDateField) <= DateAdd("m", 6, Date())
AND NOT Expired;


mfG
--> stefan <--
.
 
D

De Jager

Shazza said:
HI. Using Access 2000.

I need a formula or qurey to flag up records whith Training Certificates
that are about to Expire. I would like to know 6 months before thay
expire
so that i can organise new training before the expriry date. Is this
possible?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top