Update Quarterly Statement Sent Date

G

Guest

I am trying to send out Quarterly statements based on the issue date of the
contract. I just need to know how to update the Next Statement field with
date of the next statement. Basically adding 3 months.
This is the code I am trying but am unable to get to work because I need to
make sure that if a contract gets off track that the quarter date will always
reflect a quarter from the issue date not todays date.
Ex. If my issue date is 01/01/2005 I need statements on Jan. April, July,
& Oct.
But if the contract is not ACTIVE from May - Sep.;, a statement will be sent
in Sep. and then the update will add 90 from Sep instead of the quarter month
of April and July.

UPDATE Master SET Master.[Next Statement] =
DateSerial(Year(Date()),Month(Date()),Day([Issue Date])+90) AND
((Master.Status)="ACTIVE"))
WHERE (((Master.[Quarterly Statement])=Yes));

Thanks in adavance
 
D

David S via AccessMonster.com

It sounds like you would like to send a statement irrespective of whether the
contract is active or not - if that's the case, why not just leave out the
condition AND ((Master.Status)="ACTIVE")) to give you:
UPDATE Master SET Master.[Next Statement] =
DateSerial(Year(Date()),Month(Date()),Day([Issue Date])+90)
WHERE (((Master.[Quarterly Statement])=Yes));

(I'm assuming that you've misentered the AND bit, because I don't see how
your original SQL could have worked) You can not actually send a statement to
inactive contracts by adding the criteria Status = "ACTIVE" to that query...
 

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