[AccessD] Can I use a merge field on an Access report

Bob Gajewski rbgajewski at adelphia.net
Tue Apr 29 17:36:06 CDT 2008


Julie


1) Have you considered formatting your report to something like:

txtAllText = txtFirstPart & " " & tbl_target_year & " " & txtSecondPart

That will then always print using the value in your table.


2) If this is always current year through next year, you could automate it
without an external table using:

txtAllText = txtFirstPart & " " & DatePart("yyyy",Date()) & "-" &
DatePart("yy",Date()+1) & " " & txtSecondPart

This will then always print using the current year through next year.


3) Or, you could prompt the user to input the beginning year and automate it
from there:

txtBeginningYear
[Input beginning year:]

txtAllText = txtFirstPart & " " & txtBeginningYear & "-" &
Right([txtBeginningYear]+1) & " " & txtSecondPart



Regards,
Bob Gajewski
 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Julie Williams
Sent: Tuesday, April 29, 2008 18:18 PM
To: accessD at databaseadvisors.com
Subject: [AccessD] Can I use a merge field on an Access report

Hi all,

I have written a report in Access 2003 that for various reasons refers to
2008-09 in about 15 different places, within the text; next year the report
will have to be revised so that "2008-09" is updated to "2009-10".  I'm
looking for an easy way to do this--something similar to the way a merge
document works, I think--because I don't want to go back into the report and
make all of those changes.

I was able to write all of the queries so that rather than defining the
criteria as "2008-09" I refer to a tbl_target_year with one field and one
record, and the record right now contains 2008-09.  Next year, the criteria
in all of the queries will be updated as soon as I change the record to
2009-10.  Is there any way to easily and quickly update text on a report as
the contents of a particular field changes, like you can do in a merge.

Thanks,
Julie 


--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list