Re: Publish Report to Word - computed textbox value doesn't show

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Duane Hookom (duanehookom_at_NO_SPAMhotmail.com)
Date: 03/02/04


Date: Mon, 1 Mar 2004 20:46:18 -0600

I can't imagine a macro doing something that a function can't do in a query.

-- 
Duane Hookom
MS Access MVP
"Jeri Morris" <anonymous@discussions.microsoft.com> wrote in message
news:D1D25943-E70A-4927-B9B8-BE36DBC3DA87@microsoft.com...
> >     Can you use a function to compute so the value can be included in
the query?
>
> Unfortunately, no. The computation is way too complex.
>
> Actually, the "computation" is a set of string substitutions. The code
scans a string taken from the database for certain tags, and replaces the
tags with data from various tables in the database, and uses the resulting
string in the report. For example, if the string in the database is:
>
>      "Student <!StudentName>, living at <!StudentAddress>, paid <!Tuition>
in tuition."
>
> the code might replace that with:
>
>      "Student John Doe, living at 1 Park Plaza, New York, NY, paid $10,000
in tuition."
>
> Since I can't predict what the string containing the tags will look like
(the user is allowed to change it), the code has to fetch it from the
database, do the tag substitution, then display the result in the report.
>
> I was modifying a report created by someone else when I posted my message.
The original report used hard-coded text. I changed it to pull the text from
a table instead (without adding the complexity of the string substitution
yet), but then ran into the problem I described earlier when I tried to
export the report to Word. However, when I created a new report from scratch
and set it up the same way as the original report (or so I think), I
*didn't* have a problem exporting the report to Word--all the text shows up.
Given that the two reports behave differently when exported to Word, there
must be some difference betwen the original report and the new one that I
can't see (yet). Any thoughts on what that difference might be?
>
> Thanks,
>
> Jeri
>


Relevant Pages

  • Re: Subqueries
    ... I would try making sure that you delimited the text string with either quotation marks or an apostrophe. ... perhaps you could post the complete query that is the record source for the report. ... It is a database with information on various organizations. ... Next, to make this way user friendly, I have created a dialouge box where the user chooses from a list of counties which populates the community list. ...
    (microsoft.public.access.queries)
  • RE: Need help with looping through records to email report
    ... Assuming that the report returns all of the records pretaining to this ... and email it to each employee. ... Dim rst As DAO.Recordset ... Dim strAcountStatus As String ...
    (microsoft.public.access.forms)
  • Re: SnapTheReport -- made it generic | example useage
    ... Sub SnapTheReport(pReportName As String, pFilter As String) ... ' pFilter = string to filter report or "" to get all ... Dim mFilename As String ... SetReportFilter pReportName, pFilter ...
    (microsoft.public.access.formscoding)
  • Re: Cross-database calls to DoCmd.OutputTo for PDF or XPS output fail.
    ... Given a scenario where VBScript in a database containing a report calls code ... Public Function testRTF(rName As String, destFile As String) ...
    (microsoft.public.access.reports)
  • Re: Changing datasource for a report at run-time
    ... database you want and also log into the database on EACH table.. ... Dim strFilename As String ... Dim strReportname As String ... Dim Report As New ReportDocument ...
    (microsoft.public.vb.crystal)