Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Specialized Report Formatting at Print time 2

Status
Not open for further replies.

fbacchus

IS-IT--Management
May 3, 2001
70
US
Hi All:

I am printing a report (consisting of a summary and a sub-detail report) which I would like to enhance the formating based on the condition of a specific field on the report. So, "On Format" if the value of the field (DOC_TYPE) is "FM" I would like to Bold and change the font color to blue of the line, then reset it to normat for the other lines. This, I believe, will have to have to be done in code. Can you help steer me in the right direction?

The field on the report I am validating is DOC_TYPE and the value is "FM". Appreciate the help and thanks in advance.

fb

fb
 
Typed not tested
On the Detail's Format Event (if the textbox is in the detail)
If txtDoc_Type = "FM" Then
txtDoc_Type.ForeColor = 16711680
Else
txtDoc_Type.ForeColor = 0
End If




When Galileo theorized that Aristotle's view of the Universe contained errors, he was labeled a fool.
It wasn't until he proved it that he was called dangerous.
[wink]
 
You should be able to do this without code. Conditional formatting allows you to specify formatting based on an expression.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top