Results 1 to 4 of 4
  1. #1
    tobydobo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    169

    autopopulated text box has truncated text

    Hello,

    I have a combo box that populates another text box. Row Source: SELECT [Request Templates].ID, [Request Templates].Template, [Request Templates].Field1 FROM [Request Templates] ORDER BY [Request Templates].Template ... FIELD1 in the query is a memo type of field to allow for a longer character count. All the text fits in the table. The item selected from the combo box populates another text box which has a control source of: =[Combo123].[Column](2) This all works except, the text is truncated in the text box if i choose an item that has a large character count.

    Example:
    I choose 'Server - Racking / Cabling request' from drop down
    Text to display in text box from table:

    '1.) Locate server and confirm it matches the model information included in this request. 2.) Install rails in space as specified in CI Info section. 3.) Install server. 4.) Connect and label cables. 5.) Connect LAN and console cables as specified in CI Info section. 6.) Power on server. 7.) Notify RSO team that these steps have been completed so that they may proceed with the next step. DO NOT close workorder until you receive authorization from RSO team.'

    The actual text that is displayed in text box after combo box selection:


    '1.) Locate server and confirm it matches the model information included in this request. 2.) Install rails in space as specified in CI Info section. 3.) Install server. 4.) Connect and label cables. 5.) Connect LAN and console cables as specified in CI In'

  2. #2
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    2,949
    When Memo Fields are included in the RowSource of a Combobox they are truncated to 255 characters. The usual workaround, I believe, is to use the DLookup Function to retrieve the Memo Field data and populate the Textbox.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  3. #3
    tobydobo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    169
    would you be able to provide a little more detail on how to do that?

  4. #4
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    2,949
    The general syntax for using DLookUp here, with a Memo Field, would be

    If the UniqueIdentifier is Text
    Code:
    Private Sub ComboBoxName_AfterUpdate()
     Me. MemoFieldTextBox = DLookup("MemoFieldName", "TableorQueryName", "[UniqueIdentifier]= '" & Me.ComboBoxName & "'")
    End Sub


    If the UniqueIdentifier is Numeric
    Code:
    Private Sub ComboBoxName_AfterUpdate()
     Me. MemoFieldTextBox = DLookup("MemoFieldName", "TableorQueryName", "[UniqueIdentifier]= " & Me.ComboBoxName)
    End Sub


    This assumes that the Bound Field in the Combobox is a Field that uniquely identifies the underlying Record. If it resides in another Field, in the Combobox, you'd need to reference the correct Column using the Column(X) method.

    You'll need to replace MemoFieldTextBox, MemoFieldName, TableorQueryName, [UniqueIdentifier] and ComboBoxName using your actual names.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

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

Similar Threads

  1. Replies: 3
    Last Post: 12-22-2012, 05:33 PM
  2. Replies: 2
    Last Post: 07-21-2012, 01:21 AM
  3. Replies: 1
    Last Post: 05-24-2012, 04:59 AM
  4. Replies: 2
    Last Post: 03-01-2012, 12:21 PM
  5. Replies: 1
    Last Post: 11-05-2010, 04:31 PM

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 - Senior Forums