Results 1 to 6 of 6
  1. #1
    craigugoretz is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Feb 2015
    Posts
    9

    Problem with combo box in form truncating information

    Hello,

    I have designed a database using combo boxes in forms. In many instances when the combo boxes require more than one field, I have been writing SQL queries to concatenate the fields together into one column separated by commas. For instance, take this table of names:

    ID Last name First name
    -- ---------- ----------
    1 Johnson Steve
    2 Jackson Peter
    3 Simpson Homer

    In my combo box I have these selections:

    Jackson, Peter
    Johnson, Steve
    Simpson, Homer

    I can select one of them, and everything is fine. However, in one of my forms, the combo box items are split into two columns: (1) the selections given above, but truncated (there is only about 1" of space) and (2) a longer blank column. Interestingly, when I make a selection, the full text is given in the text portion of combo box and there is no truncation there.

    Any ideas?

    Thanks, Craig
    Access 2007
    Windows 7

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Try changing column widths with the ColumnWidths property.
    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
    craigugoretz is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Feb 2015
    Posts
    9
    The column widths property on the table is set to 0";3". I could not find a columns widths property on the form. The SQL to populate the combo box is:

    SELECT Media.ID, [Media].[Title] & ", " & [Media type].[Media type] & ", " & [Media].[Code number] AS Expr1
    FROM Media, [Media type]
    WHERE ((([Media type].ID)=[Media].[Media type]));



    The combo box displays this as an option:
    [The ABCD Read| ]

    Selecting this option yields the following text in the combo box:
    The ABCD Reader, Test 2, 123456

    The bound column for the combo box is 1.

    I think there is more the matter besides the columns width property on the table.

    -- Craig

  4. #4
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    That can't be your SQL statement can it? if you're using two tables (MEDIA and MEDIA TYPE) don't you need a link? or is this a cartesian join?

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Combobox ColumnWidths property is on the Format tab of Properties Sheet when the combobox is selected in Design view.

    The WHERE clause will act somewhat like a JOIN clause but probably better to use the JOIN clause.
    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.

  6. #6
    craigugoretz is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Feb 2015
    Posts
    9
    Thank you,

    I found the column width property and changed it to 0";4" and everything fit.

    -- Craig

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

Similar Threads

  1. Form Combo Box Saving Wrong Information
    By Steve62 in forum Reports
    Replies: 5
    Last Post: 11-12-2012, 02:29 PM
  2. Replies: 4
    Last Post: 09-17-2012, 10:36 AM
  3. Combo Box to Update Tabbed Information ona Form
    By JessicaNicole in forum Access
    Replies: 3
    Last Post: 08-30-2012, 01:56 PM
  4. Replies: 1
    Last Post: 06-28-2012, 09:57 AM
  5. Replies: 12
    Last Post: 04-18-2011, 08:52 AM

Tags for this Thread

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