Results 1 to 12 of 12
  1. #1
    Cecil861 is offline Novice
    Windows 8 Access 2013 64bit
    Join Date
    Dec 2018
    Posts
    11

    ComboBox

    I have a form that is to be used only to print out for use on the work-floor for training. There is a combo that needs to display one record from a query which is four columns wide. in the drop-down list is works fine but after a selection is made it only show one part of the record.



    In drop-down:
    FM-030 Fill-Active 2 03/23/2017

    After selection:
    FM-030

    the combo box is unbound

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Depending on the overall situation, you can concatenate the columns together or do something like this:

    http://www.baldyweb.com/Autofill.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Cecil861 is offline Novice
    Windows 8 Access 2013 64bit
    Join Date
    Dec 2018
    Posts
    11
    I don't believe this is what I am asking

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Okay, sorry...
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,643
    I think you may be missing what PBaldy is suggesting.

    for arguments sake,say you had 3 fields - PK,Fld1,Fld2

    currently you have your combo rowsource to "select PK,Fld1,Fld2 from sometable" and the column count is 3, column widths are 1,1,1.
    After selection the combo only displays the 1st visible column on your form.

    if you concatenate the fields you can display all 3.
    "select PK & " " & Fld1 & " " & Fld2 as MyDisplayedRecord, PK, Fld1, Fld2 from sometable"
    you would now have column count 4 and widths 1,0,0,0.
    column 0 would show on your form with all 3 fields and you would still be able to reference the other columns in code if you had to.

  6. #6
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Note that in the suggestion by moke123, you would also have to set the Bound Column property equal to 2 (the PK field).

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Thanks moke, I was busy and didn't feel like explaining.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  8. #8
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,643
    No Problem PB.

    I was tinkering anyway just to see if I could concatenate the string so that the fields would line up even if the lengths were different.


    Attachment 36453Attachment 36454

  9. #9
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Sounds like y'all are building a one-row listbox of sorts. Interesting...
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  10. #10
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Really? What makes it sound like that?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  11. #11
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    How would a combo box that (untypically) was made to show multiple fields/columns look a whole lot different from a list box, which is designed to show multiple fields/columns - except for
    - the fact that a list box can show multiple rows/records and a combo cannot
    - the listbox columns have divider lines (which means the combo needs data separators?)

    Not saying there's anything wrong with the suggestions. When I said it was 'interesting' I meant it in a complimentary way.

  12. #12
    Cecil861 is offline Novice
    Windows 8 Access 2013 64bit
    Join Date
    Dec 2018
    Posts
    11
    Awesome information thank you all for the help. I needed up using a couple textbox to display the information.

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

Similar Threads

  1. Replies: 1
    Last Post: 05-13-2015, 01:14 PM
  2. Replies: 1
    Last Post: 01-16-2015, 09:28 AM
  3. Replies: 1
    Last Post: 09-06-2011, 01:47 PM
  4. Replies: 0
    Last Post: 08-24-2010, 06:38 PM
  5. Replies: 0
    Last Post: 12-16-2009, 01:14 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