Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2009
    Posts
    5

    Question Unanswered: Memo truncating form

    I have a database with a Form that contains VB code and not an actual query. I am running into an issue that I haven't seemed to find the answer that works yet. I have the Jet4 pack and my memo is truncating at 255 characters. I don't know how to change it to stop the truncating. I've seen the UNION ALL or change the Unique to No on the query but all I have is the VB code. Does anyone have any suggestions? Here is my code:

    Private Sub Department_AfterUpdate()
    Dim strSQL As String

    strSQL = "SELECT [QuestionText] " _
    & "FROM [Questions] " _
    & "WHERE Department = '" & Me.Department.Column(1) & "'"

    Me.QuestionText.RowSource = strSQL

    End Sub

    Private Sub QuestionText_AfterUpdate()
    Dim strSQL As String

    strSQL = "SELECT [QuestionAnswer] " _
    & "FROM [Questions] " _
    & "WHERE [QuestionText] = '" & Me.QuestionText & "'"

    Me.QuestionAnswer.RowSource = strSQL
    Me.QuestionAnswer = Me.QuestionAnswer.ItemData(0)
    End Sub

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    I have the Jet4 pack and my memo is truncating at 255 characters.
    What is the Jet4 pack?

    Which is the memo field that is being truncated?
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    Jan 2009
    Posts
    5

    Memo truncating form

    Sorry-The memo field is the QuestionAnswer that truncates. It does truncate when I export it only on the Form where I need to view it. The Jet 4 I think is a service pack but from some searches found that it may be part of why it's happening.

  4. #4
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    MSAccess likes to truncate memo fields in queries. A couple of possible techniques:

    1. If the recordset isn't too big, you could possible write a function which opens the recordset (based on the ID passed to it) and returns the memo field (defined as a variant). Then in your query, you might have an expression column such as: =retMemoData([RecIDField]). This will preform slowly though so it's not advisable for large recordsets.

    2. Another method I've used (if I need to pass the memo info in the query to a textbox on the form) is to again write a function passing the ID field to the function and returning a variant (as above) but return it to the textbox on the form.

    3. Another method (which I usually don't like to use), is to divide the memo field in X parts in the query using an expression and the left, mid, right functions in those expressions for each column. I can't recall if I had problems with this though as it's been a while.

    Regardless, I've usually had success if I can somehow utilize a function which returns the memo data (as a variant) from calling that function.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

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