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!

Changing format for individual rows in a Form

Status
Not open for further replies.

taranis

Programmer
Jan 31, 2001
20
US
I would like certain values in a FORM to show up in a different format (i.e BOLD) depending on values in another table. I am viewing the form in tabular format.

First of all can I do this? It seems that all of the formatting properties apply to the whole column when I only want the format to apply to a certain field in a particular row.

any help would be appreciated
 
Hi,
I used a "Rich Text Control" in a form to have Bold,
Italic and Underline in a field.IT is an ActiveX control.It works fine but stores the Text in RichText format.You can
have a look at this control and see if it is of any help
Hope this helps,

Rann
 
If by tabular, you mean Continuous Form and not DataSheet, then you can accomplish this by using two TextBoxes stacked on top of each other, and with both having their Back Style set to Transparent. Then Format the two TextBoxes so that one is Bold, and the other isn't. Next you need to use an IIf statement for the ControlSource for each of the two TextBoxes.

This example uses the value of a TextBox (txtZip) on the form (which can be hidden by setting its Visible property to False) to test for the first character to see if it is a 2, if so, then one TextBox's ControlSource is Set to the Field named State, and the other TextBox's ControlSource is set to Null/Zero Length String by using ""

For one of the TextBoxes Use
= IIf(Left(txtZip,1) = "2", [State], "")
For the other TextBox Use
= IIf(Left(txtZip,1) = "2", "", [State])

This of course only works if you have a TextBox on the Form with the value that you base the ControlSource on. If Not then you need to come up with another way of capturing the value.

PaulF

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top