Results 1 to 9 of 9
  1. #1
    jlindquist23 is offline Advanced Beginner
    Windows 7 64bit Access 2016
    Join Date
    Jan 2019
    Posts
    43

    On Change command truncates memo field.

    I'm using a Combo Box with an On Change event to fill in data in my form.


    There is one field that is a long memo field. When the data for the memo field is populated, it gets truncated.

    The memo field in the query I'm using to fill the data is not truncated.

    All the data formats are set to Rich Text for the table it is coming from and the table it is going to.
    The field it is going to is also formatted to a Can Grow state JIC.

    Am I missing something?
    Click image for larger version. 

Name:	Capture23.jpg 
Views:	8 
Size:	26.2 KB 
ID:	38537Click image for larger version. 

Name:	Capture24.PNG 
Views:	8 
Size:	9.9 KB 
ID:	38538

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,643
    Exactly how are you using combobox to accomplish this? A combobox column is limited to 255 characters.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    jlindquist23 is offline Advanced Beginner
    Windows 7 64bit Access 2016
    Join Date
    Jan 2019
    Posts
    43
    Me.txtSageMemo.Value = Me.cboItemNo.Column(27)
    Is there another way to accomplish this and not use a combo box?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,643
    As I said, combobox column limited to 255 characters, or so I thought. I count 250 characters/spaces in truncated string.

    Why duplicate data? Maybe have a table of these unique strings and just save record ID.

    Otherwise, use DLookup() to pull full string from memo field.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,372
    I'm using a Combo Box with an On Change event to fill in data in my form.
    Not really what they're for.
    When the data for the memo field is populated, it gets truncated.
    I'd wager that the image represents 255 characters (including any hidden ones)
    Can grow only refers to physical size, not content limits
    Do you realize that OnChange fires on every key press? Usually reserved for situations such as' find-as-you-type'
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  6. #6
    jlindquist23 is offline Advanced Beginner
    Windows 7 64bit Access 2016
    Join Date
    Jan 2019
    Posts
    43
    Can you help with the DLookup formula? I haven't used that one...

    Control Source: SageMemo is where I want the data to appear in the HTRecord form (Name txtSageMemo).
    SAGE_RCHardnessByPNQry is where the data is pulling from.
    Field name in that Query is UDF_HT_MEMO
    I'd like it to display for the current record int the HTRecord form

    Does this do that?
    DLookup("[SageMemo]", "[SAGE_RCHardnessByPNQry]", "[ItemNo]. [SAGE_RCHardnessByPNQry]", " & Forms![HTRecord]![txtSageMemo])

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,643
    What is the form's RecordSource?

    Syntax not quite right. Does txtSageMemo have value for ItemNo? Is ItemNo a number field? Shouldn't you reference combobox for the record identifier?

    Can put the expression in textbox ControlSource property:

    =DLookup("[UDF_HT_MEMO]", "[SAGE_RCHardnessByPNQry]", "[ItemNo]=" & Forms![HTRecord]![txtSageMemo])

    However, saving this retrieved value into record will require code (macro or VBA) in an event, possibly combobox AfterUpdate:

    Me.SageMemo = DLookup("[UDF_HT_MEMO]", "[SAGE_RCHardnessByPNQry]", "[ItemNo]=" & Forms![HTRecord]![txtSageMemo])
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  8. #8
    jlindquist23 is offline Advanced Beginner
    Windows 7 64bit Access 2016
    Join Date
    Jan 2019
    Posts
    43
    The forms record source is Joined_Qry
    Every ItemNo does have a SageMemo
    ItemNo is a text field.
    combo box name is cboItemNo, control source is ItemNo.

    Thank you for helping me sort this out btw!!

  9. #9
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,643
    Then modify:

    DLookup("[UDF_HT_MEMO]", "[SAGE_RCHardnessByPNQry]", "[ItemNo]='" & Forms![HTRecord]!cboItemNo & "'")

    I still wonder why save full memo value. If you save ItemNo then should be able to retrieve associated memo value in query joining tables.

    An alternative to DLookup (domain aggregate functions can cause slow performance) may be to include table with memo in the form RecordSource (don't use INNER JOIN). Bind textbox to the memo field and set it as Locked Yes and TabStop No to prevent edit.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Line change within memo field
    By anitasavio in forum Database Design
    Replies: 4
    Last Post: 03-21-2016, 07:36 PM
  2. Replies: 9
    Last Post: 07-21-2014, 11:57 AM
  3. Change Text field to Memo Field in a Query
    By Yarbz in forum Queries
    Replies: 5
    Last Post: 06-28-2012, 05:24 PM
  4. Replies: 20
    Last Post: 09-06-2011, 12:39 PM
  5. Command button to change value of other field
    By teirrah1995 in forum Programming
    Replies: 8
    Last Post: 09-09-2010, 10:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums