Printing and date

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I created a letter report that will send to all patients. It works fine!

In the report page header, I inserted "=date()" so that it shows the current
day.

Is there a way that makes the current day automatically entered to the form
or table when the letter is printed off?

Ex: The current day will be inserted automatically in the "Senddate field"
when the letter is printed off.

Thank you
Chi
 
Hi

I created a letter report that will send to all patients. It works fine!

In the report page header, I inserted "=date()" so that it shows the current
day.

Is there a way that makes the current day automatically entered to the form
or table when the letter is printed off?

Ex: The current day will be inserted automatically in the "Senddate field"
when the letter is printed off.

Thank you
Chi

Each patient's letter is one report?
You could run an update query in the report's Report Footer Print
event to add the date to the table.

CurrentDb.Execute "Update YourTable Set YourTable.[SendDate] = Date
Where YourTable.[PatientID] = """ & Me![PatientID];", dbFailOnError

Note: The table will be updated even if the report is just previewed,
without printing.

However, even if a report has been sent to the printer .... it may
not have been successfully printed. Printers do run out of paper, ink,
etc.
It would be best to code a command button on your form to update the
table's [SendDate] field.

Any future letters to the same PatientID will update the same SendDate
field.
 
Hi

I created a letter report that will send to all patients. It works fine!

In the report page header, I inserted "=date()" so that it shows the current
day.

Is there a way that makes the current day automatically entered to the form
or table when the letter is printed off?

Ex: The current day will be inserted automatically in the "Senddate field"
when the letter is printed off.

Thank you
Chi

Each patient's letter is one report?
You could run an update query in the report's Report Footer Print
event to add the date to the table.

CurrentDb.Execute "Update YourTable Set YourTable.[SendDate] = Date
Where YourTable.[PatientID] = """ & Me![PatientID];", dbFailOnError

Note: The table will be updated even if the report is just previewed,
without printing.

However, even if a report has been sent to the printer .... it may
not have been successfully printed. Printers do run out of paper, ink,
etc.
It would be best to code a command button on your form to update the
table's [SendDate] field.

Any future letters to the same PatientID will update the same SendDate
field.

Oops, assuming [PatiendID] is a Number datatype, that should have
been:

CurrentDb.Execute "Update YourTable Set YourTable.[SendDate] = Date
Where YourTable.[PatientID] = " & Me![PatientID], dbFailOnError

However if [PatiendID] is actually a Text datatype, then use:

CurrentDb.Execute "Update YourTable Set YourTable.[SendDate] = Date
Where YourTable.[PatientID] = """ & Me![PatientID] & """;",
dbFailOnError
 
Hi Fredg,

I really appreciate for your help!

Each patient's letter is one report?
I created only one report that will sent to all patients.

Ex: In the report's page header, I inserted Lastname field, firstname field
and date (). Therefore, the patient's name is changed. It looks like mail
merge in Word.

In the report's detail, I entered the letter so that it stays the same for
any patients.

--------------------

Yes! I created a parameter update query to the table's [SendDate] field. It
works, but it requires a lot of data entry. Ex: the table has 100 patients
and only 50 of them are eligible. Therefore, I have to enter the date for 50
times in the parameter boxes.

Please tell me what I should to do?
Thanks
Chi Huynh

fredg said:
Hi

I created a letter report that will send to all patients. It works fine!

In the report page header, I inserted "=date()" so that it shows the current
day.

Is there a way that makes the current day automatically entered to the form
or table when the letter is printed off?

Ex: The current day will be inserted automatically in the "Senddate field"
when the letter is printed off.

Thank you
Chi

Each patient's letter is one report?
You could run an update query in the report's Report Footer Print
event to add the date to the table.

CurrentDb.Execute "Update YourTable Set YourTable.[SendDate] = Date
Where YourTable.[PatientID] = """ & Me![PatientID];", dbFailOnError

Note: The table will be updated even if the report is just previewed,
without printing.

However, even if a report has been sent to the printer .... it may
not have been successfully printed. Printers do run out of paper, ink,
etc.
It would be best to code a command button on your form to update the
table's [SendDate] field.

Any future letters to the same PatientID will update the same SendDate
field.

Oops, assuming [PatiendID] is a Number datatype, that should have
been:

CurrentDb.Execute "Update YourTable Set YourTable.[SendDate] = Date
Where YourTable.[PatientID] = " & Me![PatientID], dbFailOnError

However if [PatiendID] is actually a Text datatype, then use:

CurrentDb.Execute "Update YourTable Set YourTable.[SendDate] = Date
Where YourTable.[PatientID] = """ & Me![PatientID] & """;",
dbFailOnError
 
Hi Fredg,

I really appreciate for your help!

Each patient's letter is one report?
I created only one report that will sent to all patients.

Ex: In the report's page header, I inserted Lastname field, firstname field
and date (). Therefore, the patient's name is changed. It looks like mail
merge in Word.

In the report's detail, I entered the letter so that it stays the same for
any patients.

--------------------

Yes! I created a parameter update query to the table's [SendDate] field. It
works, but it requires a lot of data entry. Ex: the table has 100 patients
and only 50 of them are eligible. Therefore, I have to enter the date for 50
times in the parameter boxes.

Please tell me what I should to do?
Thanks
Chi Huynh

fredg said:
On Mon, 29 Oct 2007 07:52:03 -0700, Chi wrote:

Hi

I created a letter report that will send to all patients. It works fine!

In the report page header, I inserted "=date()" so that it shows the current
day.

Is there a way that makes the current day automatically entered to the form
or table when the letter is printed off?

Ex: The current day will be inserted automatically in the "Senddate field"
when the letter is printed off.

Thank you
Chi

Each patient's letter is one report?
You could run an update query in the report's Report Footer Print
event to add the date to the table.

CurrentDb.Execute "Update YourTable Set YourTable.[SendDate] = Date
Where YourTable.[PatientID] = """ & Me![PatientID];", dbFailOnError

Note: The table will be updated even if the report is just previewed,
without printing.

However, even if a report has been sent to the printer .... it may
not have been successfully printed. Printers do run out of paper, ink,
etc.
It would be best to code a command button on your form to update the
table's [SendDate] field.

Any future letters to the same PatientID will update the same SendDate
field.

Oops, assuming [PatiendID] is a Number datatype, that should have
been:

CurrentDb.Execute "Update YourTable Set YourTable.[SendDate] = Date
Where YourTable.[PatientID] = " & Me![PatientID], dbFailOnError

However if [PatiendID] is actually a Text datatype, then use:

CurrentDb.Execute "Update YourTable Set YourTable.[SendDate] = Date
Where YourTable.[PatientID] = """ & Me![PatientID] & """;",
dbFailOnError

What criteria makes the patient eligible to receive a letter?

Whatever that criteria is, use it to update the table instead of
running the code from within the report.

For example, if the criteria to choose which patient to send the
letter is a check box in that patients record, then code a command
button click event on the form to:

CurrentDb.Execute "Update YourTable set YourTable.SendDate = Date
Where YourTable.CheckBox = -1;", dbFailOnError

Then clear all of the check boxes:

CurrentDb.Execute "Update YourTable Set YourTable.CheckField = 0 ;",
dbFailOnError
 
Hi Fredg,

Thank you so much for your help.
Chi

fredg said:
Hi Fredg,

I really appreciate for your help!

Each patient's letter is one report?
I created only one report that will sent to all patients.

Ex: In the report's page header, I inserted Lastname field, firstname field
and date (). Therefore, the patient's name is changed. It looks like mail
merge in Word.

In the report's detail, I entered the letter so that it stays the same for
any patients.

--------------------

Yes! I created a parameter update query to the table's [SendDate] field. It
works, but it requires a lot of data entry. Ex: the table has 100 patients
and only 50 of them are eligible. Therefore, I have to enter the date for 50
times in the parameter boxes.

Please tell me what I should to do?
Thanks
Chi Huynh

fredg said:
On Mon, 29 Oct 2007 09:38:45 -0700, fredg wrote:

On Mon, 29 Oct 2007 07:52:03 -0700, Chi wrote:

Hi

I created a letter report that will send to all patients. It works fine!

In the report page header, I inserted "=date()" so that it shows the current
day.

Is there a way that makes the current day automatically entered to the form
or table when the letter is printed off?

Ex: The current day will be inserted automatically in the "Senddate field"
when the letter is printed off.

Thank you
Chi

Each patient's letter is one report?
You could run an update query in the report's Report Footer Print
event to add the date to the table.

CurrentDb.Execute "Update YourTable Set YourTable.[SendDate] = Date
Where YourTable.[PatientID] = """ & Me![PatientID];", dbFailOnError

Note: The table will be updated even if the report is just previewed,
without printing.

However, even if a report has been sent to the printer .... it may
not have been successfully printed. Printers do run out of paper, ink,
etc.
It would be best to code a command button on your form to update the
table's [SendDate] field.

Any future letters to the same PatientID will update the same SendDate
field.

Oops, assuming [PatiendID] is a Number datatype, that should have
been:

CurrentDb.Execute "Update YourTable Set YourTable.[SendDate] = Date
Where YourTable.[PatientID] = " & Me![PatientID], dbFailOnError

However if [PatiendID] is actually a Text datatype, then use:

CurrentDb.Execute "Update YourTable Set YourTable.[SendDate] = Date
Where YourTable.[PatientID] = """ & Me![PatientID] & """;",
dbFailOnError

What criteria makes the patient eligible to receive a letter?

Whatever that criteria is, use it to update the table instead of
running the code from within the report.

For example, if the criteria to choose which patient to send the
letter is a check box in that patients record, then code a command
button click event on the form to:

CurrentDb.Execute "Update YourTable set YourTable.SendDate = Date
Where YourTable.CheckBox = -1;", dbFailOnError

Then clear all of the check boxes:

CurrentDb.Execute "Update YourTable Set YourTable.CheckField = 0 ;",
dbFailOnError
 
Hi! Is there a way that makes the current day automatically entered to the
this master letter that I want to use? Thank you very much for your help!
Have a super day. :)
 
Hi! Is there a way that makes the current day automatically entered to the
this master letter that I want to use? Thank you very much for your help!
Have a super day. :)

Please ask this Word question in a Word newsgroup. If you're creating letters
in Microsoft Access, please explain.
 
Back
Top