If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Making text BOLD
Hi all
I have a report that is generated from my Db. The report takes the form of a letter to the customer where the fields are populated with text concatenated with data from the Db. All is fine apart from the user now requires that the data fields appear in Bold so that they stand out in the letter? The problem is that the data fields can be of very different length and in order to get the letter to flow correctly the only way I could think of doing it was as below. Does anyone have a solution on how to get just the data fields to appear in bold? Thinks in advance. Mike ***********************current code***************************** ="Our records show that the payment for your " & [Caravan] & " is due for renewal. The payment is/was due on " & [CustomerPaymentDueDate] & " and this year the rate is £" & [RateCost] & " including VAT. This is based on your previous rental period of " & [RateDurationText] & "." ********end code********************************************** *** |
#2
|
|||
|
|||
Making text BOLD
I believe Stephan Lebans Rich Text control can solve your issue.
http://www.lebans.com/richtext.htm Mike Green wrote: Hi all I have a report that is generated from my Db. The report takes the form of a letter to the customer where the fields are populated with text concatenated with data from the Db. All is fine apart from the user now requires that the data fields appear in Bold so that they stand out in the letter? The problem is that the data fields can be of very different length and in order to get the letter to flow correctly the only way I could think of doing it was as below. Does anyone have a solution on how to get just the data fields to appear in bold? Thinks in advance. Mike ***********************current code***************************** ="Our records show that the payment for your " & [Caravan] & " is due for renewal. The payment is/was due on " & [CustomerPaymentDueDate] & " and this year the rate is £" & [RateCost] & " including VAT. This is based on your previous rental period of " & [RateDurationText] & "." ********end code********************************************** *** -- HTH - RuralGuy (RG for short) acXP WinXP Pro Please post back to this forum so all may benefit. Message posted via http://www.accessmonster.com |
#3
|
|||
|
|||
Making text BOLD
Mike,
If you wanted to achieve your objective only using Microsoft products, then it can be done, but it's not quite so straightforward. You can set up your letter as a Microsoft Word template and mailmerge the data into the template from the Access database. You can insert any formatting you like into a Word template, ie you are not limited if the formatting becomes sophisticated. You can automate the mailmerge using VBA. One issue you had to work around with Access 2000 (I don't know about later versions of Access) was that, when you executed the merge using VBA, a second copy of the database would open and it wouldn't close when the mailmerge finished. The workaround, which is detailed in the book "Access Cookbook" by Getz, Litwin and Baron, involves using a query to export the mailmerge data to an RTF (Rich Text Format) file, performing the mailmerge between the Word template and the RTF file, and then deleting the RTF file. It's not difficult but there are a number of steps you need to perform carefully, so it might be best to get hold of the book. One further tip if you go down this road, use a Word template, not a Word document. Use Word's CreateDate() function in the template to insert the current date into the letter. The CreateDate() function returns the date on which a document is created (when a document is created from a template) and that date will not change if you save the document and subsequently open it on a later date. If you use the Date() function instead, you'll be in trouble. Geoff. "Mike Green" wrote in message ... Hi all I have a report that is generated from my Db. The report takes the form of a letter to the customer where the fields are populated with text concatenated with data from the Db. All is fine apart from the user now requires that the data fields appear in Bold so that they stand out in the letter? The problem is that the data fields can be of very different length and in order to get the letter to flow correctly the only way I could think of doing it was as below. Does anyone have a solution on how to get just the data fields to appear in bold? Thinks in advance. Mike ***********************current code***************************** ="Our records show that the payment for your " & [Caravan] & " is due for renewal. The payment is/was due on " & [CustomerPaymentDueDate] & " and this year the rate is £" & [RateCost] & " including VAT. This is based on your previous rental period of " & [RateDurationText] & "." ********end code********************************************** *** |
#4
|
|||
|
|||
Making text BOLD
An example of using a Word Template for a data merge, is at:
http://www.datastrat.com/Code/WordMerge.txt -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com "Geoff" wrote in message ... Mike, If you wanted to achieve your objective only using Microsoft products, then it can be done, but it's not quite so straightforward. You can set up your letter as a Microsoft Word template and mailmerge the data into the template from the Access database. You can insert any formatting you like into a Word template, ie you are not limited if the formatting becomes sophisticated. You can automate the mailmerge using VBA. One issue you had to work around with Access 2000 (I don't know about later versions of Access) was that, when you executed the merge using VBA, a second copy of the database would open and it wouldn't close when the mailmerge finished. The workaround, which is detailed in the book "Access Cookbook" by Getz, Litwin and Baron, involves using a query to export the mailmerge data to an RTF (Rich Text Format) file, performing the mailmerge between the Word template and the RTF file, and then deleting the RTF file. It's not difficult but there are a number of steps you need to perform carefully, so it might be best to get hold of the book. One further tip if you go down this road, use a Word template, not a Word document. Use Word's CreateDate() function in the template to insert the current date into the letter. The CreateDate() function returns the date on which a document is created (when a document is created from a template) and that date will not change if you save the document and subsequently open it on a later date. If you use the Date() function instead, you'll be in trouble. Geoff. "Mike Green" wrote in message ... Hi all I have a report that is generated from my Db. The report takes the form of a letter to the customer where the fields are populated with text concatenated with data from the Db. All is fine apart from the user now requires that the data fields appear in Bold so that they stand out in the letter? The problem is that the data fields can be of very different length and in order to get the letter to flow correctly the only way I could think of doing it was as below. Does anyone have a solution on how to get just the data fields to appear in bold? Thinks in advance. Mike ***********************current code***************************** ="Our records show that the payment for your " & [Caravan] & " is due for renewal. The payment is/was due on " & [CustomerPaymentDueDate] & " and this year the rate is £" & [RateCost] & " including VAT. This is based on your previous rental period of " & [RateDurationText] & "." ********end code********************************************** *** |
#5
|
|||
|
|||
Making text BOLD
Thanks all for your help I went for the mail merge method!
"Mike Green" wrote in message ... Hi all I have a report that is generated from my Db. The report takes the form of a letter to the customer where the fields are populated with text concatenated with data from the Db. All is fine apart from the user now requires that the data fields appear in Bold so that they stand out in the letter? The problem is that the data fields can be of very different length and in order to get the letter to flow correctly the only way I could think of doing it was as below. Does anyone have a solution on how to get just the data fields to appear in bold? Thinks in advance. Mike ***********************current code***************************** ="Our records show that the payment for your " & [Caravan] & " is due for renewal. The payment is/was due on " & [CustomerPaymentDueDate] & " and this year the rate is £" & [RateCost] & " including VAT. This is based on your previous rental period of " & [RateDurationText] & "." ********end code********************************************** *** |
Thread Tools | |
Display Modes | |
|
|