473,657 Members | 2,351 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how can I bold a portion of a text box?

Hi - I have a function that returns a value to a text field. I need to
bold a portion of the text field to match up with the rest of the
form. I'd rather not split it into two separate text fields because
the text should only display if certain criteria is met, so it's more
complicated with 2 text boxes...

Here is my code...

Function Relation(LOA2 As Variant, Details2 As Variant)
Select Case LOA2
Case Is = "Personal-Family Illness"
Relation = "Family Illness Relation: " & Details2
Case Is = "FMLA-Family Illness"
Relation = "Family Illness Relation: " & Details2
Case Else
Relation = ""
End Select
End Function

I need to bold "Family Illness Relation:" - Any ideas

Jun 27 '07 #1
5 7604
suggest you check Stephen Lebans' rich text control at
http://www.lebans.com/richtext.htm
to see if that will work for your needs.

hth
"Coll" <co*********@ho tmail.comwrote in message
news:11******** **************@ m36g2000hse.goo glegroups.com.. .
Hi - I have a function that returns a value to a text field. I need to
bold a portion of the text field to match up with the rest of the
form. I'd rather not split it into two separate text fields because
the text should only display if certain criteria is met, so it's more
complicated with 2 text boxes...

Here is my code...

Function Relation(LOA2 As Variant, Details2 As Variant)
Select Case LOA2
Case Is = "Personal-Family Illness"
Relation = "Family Illness Relation: " & Details2
Case Is = "FMLA-Family Illness"
Relation = "Family Illness Relation: " & Details2
Case Else
Relation = ""
End Select
End Function

I need to bold "Family Illness Relation:" - Any ideas

Jun 27 '07 #2
I think you'd find it simpler and less problematic to just split it into two
controls and work with it that way. But if you insist on having it in one
control, then you can use Stephen Lebans' rich text control, or just use the
MS Rich Textbox 6.0 control, which comes with Access. If you're using Access
2002 or later, then you can't use the built-in Rich Textbox control, so
you'd have to use Stephen's or a similar one. But if you're using Access
2000, then the built-in one should suffice for your needs, as it's a pretty
straightforward thing you're wanting.

Neil
"Coll" <co*********@ho tmail.comwrote in message
news:11******** **************@ m36g2000hse.goo glegroups.com.. .
Hi - I have a function that returns a value to a text field. I need to
bold a portion of the text field to match up with the rest of the
form. I'd rather not split it into two separate text fields because
the text should only display if certain criteria is met, so it's more
complicated with 2 text boxes...

Here is my code...

Function Relation(LOA2 As Variant, Details2 As Variant)
Select Case LOA2
Case Is = "Personal-Family Illness"
Relation = "Family Illness Relation: " & Details2
Case Is = "FMLA-Family Illness"
Relation = "Family Illness Relation: " & Details2
Case Else
Relation = ""
End Select
End Function

I need to bold "Family Illness Relation:" - Any ideas


Jun 29 '07 #3
Larry said
>(2) Move to Access 2007, in which formatting
of the built-in Text Box has been enhanced.
"Neil" responded
Re. #2, I don't think that's true. I could be
wrong (hope I am, actually), but from what
I've seen and read about the rich text features
in the A07 text box, it doesn't allow
programmatic control of the text.
Help me understand... what part of what I said in #2 is "not true"?
Further, help me understand... in what part of #2 did I state or imply that
the enhancements included programmatic control?

In fact, I haven't done enough with that feature to discuss it in great
detail, but the mere fact that you can bold and italicize text, it seems to
me, qualifies as enhancement. I certainly am careful to avoid terms that
imply "could not be better".

Stephen Lebans at http://www.lebans.com, provides a freely-downloadable
ActiveX control for Rich Text. Several "third parties" provide ActiveX
controls which are _not_ free.

Larry Linson
Microsoft Access MVP
Jun 30 '07 #4

"Larry Linson" <bo*****@localh ost.notwrote in message
news:hcmhi.676$ Pv2.282@trnddc0 3...
Larry said
>(2) Move to Access 2007, in which formatting
>of the built-in Text Box has been enhanced.

"Neil" responded
Re. #2, I don't think that's true. I could be
wrong (hope I am, actually), but from what
I've seen and read about the rich text features
in the A07 text box, it doesn't allow
programmatic control of the text.

Help me understand... what part of what I said in #2 is "not true"?
Further, help me understand... in what part of #2 did I state or imply
that the enhancements included programmatic control?
The original poster wrote:

===== start original post =======
Hi - I have a function that returns a value to a text field. I need to
bold a portion of the text field to match up with the rest of the
form. I'd rather not split it into two separate text fields because
the text should only display if certain criteria is met, so it's more
complicated with 2 text boxes...

Here is my code...

Function Relation(LOA2 As Variant, Details2 As Variant)
Select Case LOA2
Case Is = "Personal-Family Illness"
Relation = "Family Illness Relation: " & Details2
Case Is = "FMLA-Family Illness"
Relation = "Family Illness Relation: " & Details2
Case Else
Relation = ""
End Select
End Function

I need to bold "Family Illness Relation:" - Any ideas
====== end original post =========

So he needs to be able programmaticall ly bold "Family Illness Relation" in
his text box, while leaving the Details2 portion of text unbolded. You
suggested that he could accomplish this by upgrading to A07 with its new
rich text features. I was saying that upgrading to A07 would not accomplish
that, since it doesn't allow for programmatic control of rich text, which he
needs.

>
In fact, I haven't done enough with that feature to discuss it in great
detail, but the mere fact that you can bold and italicize text, it seems
to me, qualifies as enhancement. I certainly am careful to avoid terms
that imply "could not be better".

Stephen Lebans at http://www.lebans.com, provides a freely-downloadable
ActiveX control for Rich Text. Several "third parties" provide ActiveX
controls which are _not_ free.
Yes, and there's also the Microsoft Rich Textbox 6.0, which is included with
Access, but which only works through Access 2000. That one would be plenty
good for what he's trying to accomplish, as long as he's in A2000 or
earlier.

Neil

>
Larry Linson
Microsoft Access MVP

Jun 30 '07 #5
I was looking at your note again, and I really don't see why it would be
more complicated to have two text boxes. It's quite simple really. Call the
first one RelationLabel, and leave the second one Relation. Your code would
be:

Function Relation(LOA2 As Variant, Details2 As Variant)
Select Case LOA2
Case Is = "Personal-Family Illness"
RelationLabel = "Family Illness Relation: "
Relation = Details2
Case Is = "FMLA-Family Illness"
RelationLabel = "Family Illness Relation: "
Relation = Details2
Case Else
RelationLabel = ""
Relation = ""
End Select
End Function

Better yet would be to just use an actual label for the RelationLabel part,
and just set its Visible property as needed:

Function Relation(LOA2 As Variant, Details2 As Variant)
Select Case LOA2
Case Is = "Personal-Family Illness"
RelationLabel.V isible = True
Relation = Details2
Case Is = "FMLA-Family Illness"
RelationLabel.V isible = True
Relation = Details2
Case Else
RelationLabel.V isible = False
Relation = ""
End Select
End Function

That doesn't seem to me to be complicated at all. And it's a lot more
straightforward than having to deal with implementing an ActiveX control
across various workstations.

Neil
"Coll" <co*********@ho tmail.comwrote in message
news:11******** **************@ m36g2000hse.goo glegroups.com.. .
Hi - I have a function that returns a value to a text field. I need to
bold a portion of the text field to match up with the rest of the
form. I'd rather not split it into two separate text fields because
the text should only display if certain criteria is met, so it's more
complicated with 2 text boxes...

Here is my code...

Function Relation(LOA2 As Variant, Details2 As Variant)
Select Case LOA2
Case Is = "Personal-Family Illness"
Relation = "Family Illness Relation: " & Details2
Case Is = "FMLA-Family Illness"
Relation = "Family Illness Relation: " & Details2
Case Else
Relation = ""
End Select
End Function

I need to bold "Family Illness Relation:" - Any ideas


Jun 30 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
5548
by: Victor Martin | last post by:
Bold text in proportional fonts use up more space than non-bold text. Is there a way to keep the space bold takes up within the limits of the regular text while keeping the same font?
2
4678
by: Vinny Vinn | last post by:
Any ideas on how i can bold the text within a specific cell of a winforms datagrid?i have used DataGridColumnStyle for an entire column,however currently i need just the text of a specific cell to be bold? Thanks
12
2405
by: one man army | last post by:
New to this, good programmer, picking up some js I wanted to set a line of text as text BOLD more text BOLD text BOLD I can set the text in javascript in a single <div>, but I tried this <div id="divResText1_id" style=" font-family: Arial,sans-serif; text-align: center; font-size: 14px;"> The search returned </div> <div id="divResTextCnt_id" style=" font-size: 20px; font-weight:bold;">
11
4748
by: Mano | last post by:
When settiing a TreeNode to bold the text label of that node is clipped. As describedin in the Bug Rebort FDBK16963 I set the underliying TreeView Fond to be bold. Now I have the strange behavior, if I delete all childnodes, when the parent node is expanted, and rebuild all child treenodes, I can make an childnode bold without clipping it. If I make the same with an closed parent node so after rebulding all childnodes and expanting it,...
2
3549
by: genojoe | last post by:
Is it possible to include one line of bold text followed by one line of regular text in the MsgBox control? What I would like to see is the following lines <Bold>The text you entered isn't an item in the list.<Bold> <Regular>Select an item from the list, or enter text that maches one of the listed items.<Regular>
0
1011
by: code937 | last post by:
Im making a report writer for a program ive spent months making, during this time ive written a logger, that logs every action that is made while running the program (so if someone deletes a user or edits something etc) and this report writer looks in the log between 2 dates and pulls out anything that meets criterias. which is then shoved into an RTF Box line at a time (All happening super fast) how do i make one bit of text bold then the...
2
8864
by: =?Utf-8?B?Y29vbGw=?= | last post by:
I wonder if I have a DataTable instance, and I want to bold a the text in a specific field. How can I do that.
6
1929
by: =?Utf-8?B?bWlrZQ==?= | last post by:
trying to convert selected text in a textbox to bold font. can someone provide me code sample? thanks.
3
5082
by: stevedude | last post by:
A CSS newbie here: I've been learning CSS as I go along developing a web page. I am trying to make a horizontal menu link for a footer. On 'hover', I want the linked text to have a 'bold' font for easier readability. With my current code, the linked text moves on the hover state. If I remove the CSS code so that the hover state text is normal and not bold, the text does not move. I've searched the Web and cannot find a solution, only...
7
5200
by: RickMerrill | last post by:
it appears that <ttwill not do <b> although it will do <u>. IS there any way to do bold with a fixed width?
0
8399
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8606
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6169
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4159
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2732
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1959
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1622
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.