B
Bruce
This is something of a repost, but I could not figure out how to implement
the suggestions received at the time, or they did not work.
I have been working on something for a while, and I can't seem to get it on
track. I will describe it as succinctly as is possible, and can add more
information as needed.
Some or our vendors need to be certified to various standards (such as ISO).
The certificates include an expiration date, usually three or so years from
the present. I have set up a query (as the basis for a report) so that as
the expiration date nears we generate a notice requesting an updated
certificate. If we don't receive an update we send a second notice, etc.
A new requirement calls for us also to obtain annually from each vendor a
statement that they are still compliant with the certification standards. To
that end I need to send out a notice requesting the statement. It would be
best if I could do so on about the expiration date. As the database is not,
if a company's certificate is due to expire on 12/1/04, on 11/1/04 I send a
notice that the certificate is about to expire. That part is OK. If another
company's certificate expires on 12/1/05 or 12/1/06, on 11/1/04 (one month
before the expiration month and day) I want to send a notice requesting a
statement of continued compliance. This is where I am having difficulty.
First, these are the relevant fields, I think, in tblVendors:
VendorID (PK) - Autonumber
VendorName - Text
ExpDate - Date/Time (certificate expiration date)
There are other fields such as city, state, fax number, etc., but I don't
think they are relevant to the current task.
I am not sure of the best approach, which is why I am writing. I tried
filtering the query with the criteria >DateSerial(Year(Date())+1,1,0) in
ExpDate (to exclude vendors with an expiration date that is this year, since
they are handled differently), then creating a calculated field in qryVendors
(based on tblVendors):
ReviewDate: DateSerial(Year(Date()),Month([ExpDate]),Day([ExpDate])), then
applying criteria using DateAdd to the results of that field as if it was the
current year (12/1/06 will produce 12/1/04 in ReviewDate), but I get a type
mismatch error message.
I could go through a list of things I have tried, but the point is that none
of them have worked. Any suggestions of how I can identify vendors with
certificates that are due to expire one year plus one month (or less) from
now, two years plus one month (or less) from now, etc.?
By the way, filtering out vendors with expiration dates that occur in the
current year seems to generate a new set of problems at the edges of the
year. For instance, if a certificate expires on 12/30/05, if they are late I
can't send out a second notice, since it will be the current year by then and
they will be filtered out.
Somewhere along the line I need to add a yes/no field to identify vendors
from whom information has been requested but not yet received, but I'm not
sure that fits into any of what I have already asked.
As I said, I can provide more information, but I am trying to keep it as
simple as I can. The details are not really relevant, and once I get the
basic principle to work the rest will be OK.
the suggestions received at the time, or they did not work.
I have been working on something for a while, and I can't seem to get it on
track. I will describe it as succinctly as is possible, and can add more
information as needed.
Some or our vendors need to be certified to various standards (such as ISO).
The certificates include an expiration date, usually three or so years from
the present. I have set up a query (as the basis for a report) so that as
the expiration date nears we generate a notice requesting an updated
certificate. If we don't receive an update we send a second notice, etc.
A new requirement calls for us also to obtain annually from each vendor a
statement that they are still compliant with the certification standards. To
that end I need to send out a notice requesting the statement. It would be
best if I could do so on about the expiration date. As the database is not,
if a company's certificate is due to expire on 12/1/04, on 11/1/04 I send a
notice that the certificate is about to expire. That part is OK. If another
company's certificate expires on 12/1/05 or 12/1/06, on 11/1/04 (one month
before the expiration month and day) I want to send a notice requesting a
statement of continued compliance. This is where I am having difficulty.
First, these are the relevant fields, I think, in tblVendors:
VendorID (PK) - Autonumber
VendorName - Text
ExpDate - Date/Time (certificate expiration date)
There are other fields such as city, state, fax number, etc., but I don't
think they are relevant to the current task.
I am not sure of the best approach, which is why I am writing. I tried
filtering the query with the criteria >DateSerial(Year(Date())+1,1,0) in
ExpDate (to exclude vendors with an expiration date that is this year, since
they are handled differently), then creating a calculated field in qryVendors
(based on tblVendors):
ReviewDate: DateSerial(Year(Date()),Month([ExpDate]),Day([ExpDate])), then
applying criteria using DateAdd to the results of that field as if it was the
current year (12/1/06 will produce 12/1/04 in ReviewDate), but I get a type
mismatch error message.
I could go through a list of things I have tried, but the point is that none
of them have worked. Any suggestions of how I can identify vendors with
certificates that are due to expire one year plus one month (or less) from
now, two years plus one month (or less) from now, etc.?
By the way, filtering out vendors with expiration dates that occur in the
current year seems to generate a new set of problems at the edges of the
year. For instance, if a certificate expires on 12/30/05, if they are late I
can't send out a second notice, since it will be the current year by then and
they will be filtered out.
Somewhere along the line I need to add a yes/no field to identify vendors
from whom information has been requested but not yet received, but I'm not
sure that fits into any of what I have already asked.
As I said, I can provide more information, but I am trying to keep it as
simple as I can. The details are not really relevant, and once I get the
basic principle to work the rest will be OK.