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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bold text formatted in uppercase 1

Status
Not open for further replies.

labanTek

Instructor
Dec 3, 2004
37
Hi I need some help with this, I have a textbox that displays information from a table. This event is triggered by a combobox. I would like to be able to bold all the text in the textbox that is formatted in uppercase only. The information coming from the table has a mixture or normal and uppercase letters. Here is part of my code:
The name of my ADODB recordset is rstUser.
Thanks in advance.

If cboMenuOption1.Value = rstUser.Fields
"StepHeading").Value Then
txtMajorStep.Value = rstUser.Fields("MajorStep").Value
End If
 
How are ya labanTek . . . . .
[ol][li]In [blue]form design view[/blue], for the textbox in question, set the [blue]Font Weight property to [purple]Bold[/purple][/blue].[/li]
[li]Save the form.[/li]
[li]Then in the [blue]AfterUpdate[/blue] event of the combo:
Code:
[blue]If Me!cboMenuOption1 = rstUser!StepHeading Then
  Me!txtMajorStep = StrConv(rstUser!MajorStep, vbUpperCase)
End If[/blue]
[/li][/ol]

Calvin.gif
See Ya! . . . . . .
 
Thanks so much for your help TheAceMan1 it was truely helpful. See ya
 
I tried it and I now realized that its not doing what I wanted it to do. I would like only the text that is displayed in uppercase to be changed to bold, nothing else in the textbox should be bold. The text coming from the database is a mixture of uppercase and lowercase. Or is there another way I can show a mixed formatting in the same text box from a database. Is this possible. Any help will be appreciated.
 
I don't think that's possible for ordinary form controls.

Stephen Lebans has found a way to do so with ordinary text controls on a report, see the tbLady control in the Lady report in the Lady database here MixBold-Plain and the coding in the on print event procedure of the detail section. But again, I don't think you'll be able to do that with ordinary form controls.

There's something called Rich Text Box, of which I know nothing, where you're supposed to be able to do such. Sorry, can't be of more assistance, but a search on Rich Text Box will perhaps give something to work with?

Roy-Vidar
 
labanTek . . . . .

Thats a horse of a different color. [blue]RoyVidars[/blue] suggestion is the only way you'll get this done. I've seen RTF used, but never had the pleasure myself.

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top