ColeValleyGirl
ColeValleyGirl

Reputation: 579

Unable to set text box format to Rich Text for a calculated text field in a report

I have a report based on the following query (qryrptTaskbyrepository):

SELECT qryRepository.RepName, 
[Source] & (" (Format: "+[tblsourceformat.Format]+")") & (" (Call: "+[Call]+")") AS SourceInfo, 
qryTask.ResearchTitle
FROM ((((qryTask LEFT JOIN qrySource ON qryTask.SourceID = qrySource.SourceID)
LEFT JOIN qryRepositoryAccess ON qrySource.SourceID = qryRepositoryAccess.SourceID)
LEFT JOIN qryRepository ON qryRepositoryAccess.RepositoryID = qryRepository.RepositoryID)
LEFT JOIN tblSourceFormat ON qryRepositoryAccess.Format = tblSourceFormat.FormatID
ORDER BY qryRepository.RepName, [Source] & (" (Format: "+[tblsourceformat.Format]+")") & (" (Call: "+[Call]+")"), qryTask.ResearchTitle;

[Source] and [tblsourceformat.Format] are plain text fields and [Call] is a Rich Text memo field. I want SoureceInfo ([Source] & (" (Format: "+[tblsourceformat.Format]+")") & (" (Call: "+[Call]+")")) to display as multiline rich text (at least for the Call element, but can't set the field in the report to this option (presumably because it's based on a calculation in the query).

The record source for the report is:

SELECT * FROM qryrptTaskbyrepository WHERE ([RepositoryID] IS Null) OR [RepositoryID] IN (11,9); 

The constraints on RepositoryID are determined by the user (by selecting items from a list of repositories) bewfore the report is generated.

What are my options for working round this? One possibility is obviously to display the Call info in a separate field; are there any others?

Upvotes: 1

Views: 3730

Answers (1)

Gord Thompson
Gord Thompson

Reputation: 123429

The issue:

Unable to change the Text Format property of a text box to Rich Text:

The setting you entered isn't valid for this property.

I was able to recreate this issue when the Record Source property of the report was a SQL command ("SELECT ..."). The following workaround seems to have fixed it:

  • With the report open in Design View, click the ellipsis button ([...]) beside the Record Source property of the form.
  • Click the "Save As" button on the ribbon of the query designer. Save the query as "ReportQuery".
  • Click the "Close" button (or type Ctrl+W) to close the query designer. Choose "Yes" when prompted to save the changes.
  • Check the Record Source of the report. It should now simply be ReportQuery.
  • You should now be able to change the Text Format property of the [SourceInfo] text box to Rich Text.

Upvotes: 3

Related Questions