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!

Bolding text conditionally 1

Status
Not open for further replies.

cssilver

Technical User
Aug 6, 2000
17
US
I would like to have a certain field in a report to appear in BOLDFACE depending on a certain condition.  How can I do that?
 
If you are talking about in the Detail Section of your report, use the On Format event of the Detail Section.<br><br>Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)<br>If <b>Place your condition here</b> Then<br>Me![<b>YourControlName</b>].FontWeight = 700 <b>'700 = Font Bold</b> <br>Else<br>Me![<b>YourControlName</b>].FontWeight = 400 <b>'400 = Font Regular</b> <br>End If<br>End Sub<br><br>You'll need to supply the condition above and change the name <u><b>YourControlName</b></u> to the actual name of your control.<br><br>HTH<br>RDH <p>Ricky Hicks<br><a href=mailto: rdhicks@mindspring.com> rdhicks@mindspring.com</a><br><a href= > </a><br>
 
If you are using Access 2000, there is conditional formatting on the menu bar. Select the field you want to apply the condition on, then select format on the menu bar and then &quot;Conditional Formatting&quot;. This is quite powerful and works on continuous forms. <br><br>Jerry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top