V
vavroom
So, for my next roadbump...
I'm having to send form letters every day, to multiple recipients.
Recipients are selected based on a date/daterange on a record. So far
so good.
I created a report which works as I want and displays things properly.
So far so good.
Where the problem begins, however, is that the letter should have a
different body of text, depending on the status of the recipient's
application (i.e. different letter if their application is approved, or
declined, and if it's declined, different again depending on the reason
the application is declined).
I *could* create as many reports as I need letters, but this
complicates things in many ways. First, if you need to change the text
of the form letters (which happens periodically), you have to edit the
various reports. Then, you have to run each report based on the
date/daterange.
What I was thinking of doing is putting the letterbody in a table,
associated with an application status/declined explanation. Then when
the report is run, have it select the right text from the lettertext
table depending on the status, so the user can enter a date/daterange
on a form and click a button, and each record on the report would show
with the appropriate text/details.
I was able to do something that kinda worked, using a mixture of iif
and dlookup directly in a textfield in the report. But I'm concerned
about performance, and it seems rather unwieldy to do several nested
iif and dlookups.
I doing an if/else series of statements in code, and assigning the
value of the txtbox based on the result of these statements, but it
tells me I can't assign a value to the txtbox.
I'm not sure what to do next. Any idea?
I'm having to send form letters every day, to multiple recipients.
Recipients are selected based on a date/daterange on a record. So far
so good.
I created a report which works as I want and displays things properly.
So far so good.
Where the problem begins, however, is that the letter should have a
different body of text, depending on the status of the recipient's
application (i.e. different letter if their application is approved, or
declined, and if it's declined, different again depending on the reason
the application is declined).
I *could* create as many reports as I need letters, but this
complicates things in many ways. First, if you need to change the text
of the form letters (which happens periodically), you have to edit the
various reports. Then, you have to run each report based on the
date/daterange.
What I was thinking of doing is putting the letterbody in a table,
associated with an application status/declined explanation. Then when
the report is run, have it select the right text from the lettertext
table depending on the status, so the user can enter a date/daterange
on a form and click a button, and each record on the report would show
with the appropriate text/details.
I was able to do something that kinda worked, using a mixture of iif
and dlookup directly in a textfield in the report. But I'm concerned
about performance, and it seems rather unwieldy to do several nested
iif and dlookups.
I doing an if/else series of statements in code, and assigning the
value of the txtbox based on the result of these statements, but it
tells me I can't assign a value to the txtbox.
I'm not sure what to do next. Any idea?