var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: What approach to take
I have set up a table which contains text of simple follow up letters to send to clients. These are sent on different days after their intial visit depending on the days gap selected.
I then use a timer to print the letters at a certain time of day.
I thought it would be better to have one report and then send the records to the report (this I have figured out) if they are required.
It is deciding how to match the clients due the letter with the appropriate letter that is giving me a headache. I can see it can be done, but right now it is escaping me.
We are going to need more specifics here.
What is the criteria you are using for matching customers to a letter?
The criteria is last visit date.
For example if today was the 30th of May
All customers who came in on the 25th would be receiving a 5 day letter, the 21st a 9 day and so on.
So, your letter file may be keyed by a number representing the number of days since their last visit.
And, when scanning the client file, with the last visit day, you can convert that last visit day to the number of days since the last visit, using:
The query for your report could link this DateDateDiff with the letter file's key . . .
. . . and there you have it.