p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Access (http://p2p.wrox.com/forumdisplay.php?f=18)
-   -   Set memo field text format via VBA (http://p2p.wrox.com/showthread.php?t=70688)

dlipkie September 20th, 2008 10:56 AM

Set memo field text format via VBA
 
I would like to set the text format property of a table field that is dbMemo. Using the GUI I can set "Text Format" to "Rich Text". How do I do this using VBA?

I have no problems creating a dbMemo field.

        Set f = .CreateField("Note_RtMemo", dbMemo)
        ' this fails . no such property
        f.Properties("TextFormat") = "Rich Text"
        ' this fails . no such property
        f.Properties("Text Format") = "Rich Text"
        ' this has compile error
        f.TextFormat
        .Fields.Append f



SerranoG September 25th, 2008 06:54 AM

Welcome to P2P. Am I missing something? I don't know about Access 2007 because I don't have it yet, but Access 2003 and before don't allow rich text formatting in memo fields at all. Which version are you using?


Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division


All times are GMT -4. The time now is 03:04 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.