473,394 Members | 2,090 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

change the font color of just selected text in a subform?

49
i want to make it possible for users to change the font color of selected text in a subform. the menus are locked out so the users don't have access to this feature.

I tried using excel to create the code, but access wants an object, which I thought would be simple, but then realized if I directed it to the "messages" textbox, then the whole thing would be changed... i only want to change the color of the text selected when the button is clicked...

excel vba is as follows
Expand|Select|Wrap|Line Numbers
  1.  With Selection.Font
  2.         .Color = -16776961
  3.         .TintAndShade = 0
  4.     End With
  5.  
Jun 12 '15 #1
1 2136
Seth Schrock
2,965 Expert 2GB
The field that your textbox is bound to must be a memo field set to Rich Text format. You then use HTML tags to set the color for the selected text. It is very tricky to start dealing with that, especially if you want to be able to highlight multiple sections. I would personally try to come up with another solution unless I absolutely had to do it.
Jun 12 '15 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: beetdocta | last post by:
hello i was wondering is it possible in visual basic .net to change the color of certain words or phrases without changing the color of all the text in the lable or without having to create a new...
3
by: njuneardave | last post by:
Hey! One quick question: It's really easy to change the background color of an entire RTB, but I have looked and looked and can't find a way to change the background color of the selected text...
0
by: Meera | last post by:
How to write a macro for the following purpose. 1.Search the lines start with "//*"in CSharp file . 2.Change font color of that lines. I wrote the following code Sub ChangeFontColor() Dim...
2
by: flash | last post by:
1-When the mouse is over the course title. Its description should appear. When it the mouse is out, the description should disappear. 2-when double click on a word, its color changes to...
2
by: suvarna1026 | last post by:
Can any one tell me,how to change color of selected text.Color should be picked from colorPalette.I know only one thing that,as it is client side event,it can be done in javascript.I am using asp.net...
2
by: nspader | last post by:
Hello All, I have a DB that shows information generated on a form setup to look like a calendar. I am working with Windows 2000 and Access 2000. Public Sub PutInData() On Error GoTo...
1
by: SandeepsoniTM | last post by:
how to change back color of selected tree node when fullrowselect property is true in VB.Net by default the color of selected row is blue i want to change this color
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.