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

User wants to change the look of text on a form

Status
Not open for further replies.

palgya

Technical User
Sep 3, 2002
34
0
0
US
Hello all,
I have a client that has a form in their database that they enter account history on. They want to be able to change the font, font size, color, be able to bold, italicize and so on to emphasize certain entries/words. They enter this history in a text box that is a memo field in a table. Is there a way to enable this in access97. I know that they could pull it into word and manipulate but that doesn't help the way it looks in the database. I know that you can change the fonts in the properties but this changes everything.
Any help with this would be greatly appreciated.
Thanks
paul
 
To my knowledge, no.....especially with 97....2000 has conditional formatting available, but even this won't do what you are asking.....

One option is use a Word fiel for each of the memo fields in the database, instead of using the memo field itself. When the record is created the memo field is saved as a Word file and a hyperlink to the address of the file is stored instead of the memo file. You can then use a hyperlink on a form to open the memo field anytime you need to see it. Because it is a Word fiel, you can edit it the way they would like. I even believe you can use a OLE object on the form and display the Word object, then use the OnClick event for the object to open the "memo field" for editing in Word. Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. (Albert Einstein)

Robert L. Johnson III, MCSA, CNA, MCP, Network+, A+
Access Developer/Programmer
robert.l.johnson.iii@citigroup.com
 
Thanks Mr. Johnson,
Kind of what I thought. They are already contemplating the OLE direction.
paul
 
Hi

I hope this will help someway.
from:

Tip #8: In Place Editing with Total Access Memo
Provided by: Troy Munford, FMS Development Operations Manager

We’ve had many requests to allow end users of Total Access Memo to bold or italicize words without using our external FMS Rich Text Editor. So, we are going to show a brief example of how to programmatically allow users to do this.

First, you’ll want to have a Total Access Memo control on your form named “tamDemo”.
Next, add a single button named “cmdBold” to the form.
Now, let’s open the IDE and write a little bit of code:

We are going to set a variable to the actual Total Access Memo Control Object. By setting it to the Object, we will be using the Control's Object properties and not the built in MS Access Object properties. For more information on why you want to do it this way, see our previous Tip #1: Finding Properties and Methods of an ActiveX Control.



Once we've set the variable, we will use the Total Access Memo Control property named ".SelBold" to Bold the selected text.

Private Sub cmdBold_Click()
' Bold the selected text in the control by using the SelBold property.


' Create a variable to point to the Total Access Memo control
Dim objFMSMemo As FMSMemo

' Get a handle to the memo control
Set objFMSMemo = Me.tamDemo_Object

' Check to ensure some text is selected
If objFMSMemo.SelLength > 0 Then
If IsNull(objFMSMemo.SelBold) Then
' NULL indicates there is some bold and some not bold text selected.
' If so, set all selected Text to Bold
objFMSMemo.SelBold = True
Else
' Set it to the opposite of what it currently is.
objFMSMemo.SelBold = Not objFMSMemo.SelBold
End If


Else
MsgBox "Please select some text", vbOKOnly, "FMS TIP"
End If

End Sub

So, as you can see, the programmatic interface that our control has exposed for you, allows you to programmatically manipulate the Bold property of the text. You can also manipulate other properties such as Italics (SelItalic), Underline (SelUnderline), and more. These are only a few examples of the interface exposed for you to use. There are many more that you will find just as useful and very easy to implement as well.

If you'd like to see how we implemented the properties, methods and events available in the control, we invite you to download our Demo program that shows how to use the program. All of the code we wrote that implements these items is open for you to see how easy it is to write and utilize the code. The Demo can be found at the following URL:


CUOK
 
Great tool but not worth the price for this client.
thanks
paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top