mark letter sent

G

Guest

I have a table of letters with fields LetterBody and LetterSent, among
others. I sort letters based on value of letterSent, i.e. 0 is not sent. I
open a report with Lettersent=0 and print those letters.

What is the best way to mark all letters as sent?

i.e., I open the report from code in a form, the report opens and I print.
If I follow with code to set "sent" to -1 for these records, then this occurs
as soon as the report opens rather than after I actually print. I am sure
this is a common issue. What should I be doing?
 
M

Marshall Barton

smk23 said:
I have a table of letters with fields LetterBody and LetterSent, among
others. I sort letters based on value of letterSent, i.e. 0 is not sent. I
open a report with Lettersent=0 and print those letters.

What is the best way to mark all letters as sent?

i.e., I open the report from code in a form, the report opens and I print.
If I follow with code to set "sent" to -1 for these records, then this occurs
as soon as the report opens rather than after I actually print. I am sure
this is a common issue. What should I be doing?


A couple of ideas. One is to add a button to the form that
opens the report for users to click **after** they have
verified that the report has actually printed.

If your users are not trustworthy enough to verify that the
printer didn't jam, run out of ink/toner, get tossed out by
by the janitor, etc, then I suggest that you change the sent
field to a date/time field. Then the form can update the
records to be printed to Now. This way the print batch can
be easily identified any time you want to print (or reprint)
it.
 
F

fredg

I have a table of letters with fields LetterBody and LetterSent, among
others. I sort letters based on value of letterSent, i.e. 0 is not sent. I
open a report with Lettersent=0 and print those letters.

What is the best way to mark all letters as sent?

i.e., I open the report from code in a form, the report opens and I print.
If I follow with code to set "sent" to -1 for these records, then this occurs
as soon as the report opens rather than after I actually print. I am sure
this is a common issue. What should I be doing?

So after the letters have been sent there should then be NO records in
the table unsent?

Add a command button to your form. Code it's click event:

CurrentDb.Execute "Update YourTable set YourTable.[LetterSent] = -1;",
dbFailOnError

When you have the letters successfully printed click the button.
This will set the [LetterSent] field on all records to -1.
 

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