AboutScottgem Expertise I can answer almost all types of questions relating to Microsoft Access usage and application design. My strengths are database and interface design.
Experience I've been designing databases for over 15 years working with dBase, FoxPro, Approach and Access.
Organizations Author of Microsoft Office Access 2007 VBA Techncial Editor for Special Edition Using Microsoft Access 2007 and Access 2007 Forms, Reports & Queries From Que Publishing
Question Good observation on the [LastFirst] field. I am formating money amounts with the Format$, however, I would like to format the text in [LastFirst] with bold and sometimes underline formating.
Formating the text box
In previous versions of Word you could take one of the merged fields <<LastFirst>> and add some characters and it would change the apperance from the rest of the document. Say the font for the template was Times Roman, 12pt, Normal. you could highlight the <<LastFirst>> field add formating for Arial, 14pt, Bold). That is what I was hoping within the text box.
Mine vs theirs
Any idea why my text box in my report would read in design view "the amount provided by the state "& Format$([StateAmount],"$#,###0.00")& " " & "is funded by .....then when I print it reads -the amount provided by the state $35,600.00 is funded by....
However on my client's box with the same version of Access, excat tables and template it prints out -the amount provided by the state #Name# is funded by....
Word Merging on a query
Using the Mail Merge Wizard, and being asked to open data source, I cannot select my data base, then a query. Word 2000 would let you see the mdb, then the tables or query, etc.
I do not keep my *.dot files in the template folder provided by MsWord. The path is long, diffcult to locate and in many cases hidden. When I send them a new set of templates-it is easeir for the user to use them in a "not so deep" path.
Thanks for your help
Dan
-------------------------
Followup To
Question -
For over five years I have merged mdb databases wiht a MSWord templates (.dot). Each revision of Word, changed locations of templates, Mail Merge Wizzards and now Word XP will not let you use a source data that is built on a query of several tables. It wants one table. I create a query and export it to a an excel spreadsheet and let the document link to this code. It works okay, but another step, blah, blah,
In Prague's Access 97 Secrets Page 623 he shows how you can create "Mail Merged" documents by creating a report with "embedded fields in text". This works wonderfully, on my PC. However, when I load the mde file that contains this procedure to my clients machines (We all uss Access 2000, it does not work. The report works, but the text boxes that "mail merge" results in the #Name# errors.
I use the Format$([LastFirst],"$#,##0.00")where this is happening.
Question 1
Is thier an Add-in that I may have, that my clients have not loaded.
Any Suggestions.
Question 2
Is there away to have these "mail merged" fields be bold faced without haveing the entire text box bold faced?
I can send you examples of the procedure if you like.
Dan
Thanks
Answer -
First, I just did a test and created a mail merge document in Word using a query, that not only was multi-table, but the result of several interim queries. There was no problem in merging the data.
Second, When I create a mail merge using Word, I do my formatting in Word, not in Access. In many cases the Formatting does not carry over.
Third, What does the LastFirst field contain? It looks like you are formatting a number, but the field name suggests a concatenated name. Also have you tried Format() without the $?
I don't know of any addin that would fix this. Also you can't format parts of a text box on an Access report.
HTH
Scott<>
Answer Like I said you cannot format parts of a Text box. Formatting can only be applied to the whole box.
I'm not sure why the Name# error is coming up. That means an unresolved expression. It could be a missing reference.
Like I said, I tried the merge this morning. I have no problem in creating a merge, selecting a query as a data source and adding fields from that query into the merge document.