Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Oct 2002
    Location
    Houston, Texas, USA
    Posts
    303
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Text as Memo field (2003 - MS Outlook & MS Access)

    I have a form that we have been using a long time. This week I moved this form from our Production Exchagne 5.5 to our Lab Testing Exchagne 5.5 to test out a few changes we wanted to try. Basicly I added a few additional text fields to the form. I then moved/copies the form back to our Production Exchange 5.5 system. I added/moved the form to my Personal Folder to test out the new chagnes and they worked fine. So, Monday morning I published the for into our Produciton Organization Forms Library. These forms have been saved to a MS Access from the start with no problems.

    Now the form is giving me problems. THe field in question was format as Value = Text and in the MS Access database it is formated as Memo. Now each time I write to this field I can only enter upto 255 characters. This used to work fine as a memo field with upto 500 characters or more. What happened?

    Daniel reyes

  2. #2
    3 Star Lounger
    Join Date
    Oct 2002
    Location
    Houston, Texas, USA
    Posts
    303
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Text as Memo field (2003 - MS Outlook & MS Access)

    This is where my problem is, where is saids MEM04, Why does it say the string is to long?

    Sub cmdBookmarks_Click()
    Set oWordApp = CreateObject("Word.Application")
    If oWordApp Is Nothing Then
    MsgBox "Couldn't start Word."
    Else
    Dim oWordApp
    Dim oWordDoc
    Dim bolPrintBackground

    ' Open a new document
    Set oDoc = oWordApp.Documents.Add("tabsnasdatabase$edgarMaste rCIGARS06PCConversion4.dot")

    strMyField = Item.UserProperties.Find("fs")
    oDoc.FormFields("fs").Result = strMyField

    strMyField = Item.UserProperties.Find("dcoption")
    oDoc.FormFields("dcoption").Result = strMyField

    strMyField = Item.UserProperties.Find("memo4")
    oDoc.FormFields("memo4").Result = strMyField

    ' Get the current Word setting for background printing
    bolPrintBackground = oWordApp.Options.PrintBackground

    ' Turn background printing off
    oWordApp.Options.PrintBackground = False

    ' Print the Word document
    oDoc.PrintOut

    ' Restore previous setting
    oWordApp.Options.PrintBackground = bolPrintBackground

    ' Close and don't save changes to the document
    Const wdDoNotSaveChanges = 0
    oDoc.Close wdDoNotSaveChanges

    ' Close the Word instance
    oWordApp.Quit

    ' Clean up
    Set oDoc = Nothing
    Set oWordApp = Nothing
    End If
    End Sub

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Text as Memo field (2003 - MS Outlook & MS Acc

    You are not running into an MS Access limitation, you appear to be running into an MS Word "text" form field limitation:
    <hr><code>strMyField = Item.UserProperties.Find("memo4")
    oDoc.FormFields("memo4").Result = strMyField</code><hr>
    I can't recall the maximum size of a Word text formfield, but 255 characters would not surprise me.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Text as Memo field (2003 - MS Outlook & MS Access)

    Jefferson's reply jogged my memory - setting the Result of a form field in Word is indeed limited to 255 characters. There is a workaround: see JanB's <post:=572,453>post 572,453</post:>.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •