Page 1 of 2 12 LastLast
Results 1 to 15 of 24
  1. #1
    Narvic is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Mar 2013
    Posts
    12

    Combo Box Column Order and Selection


    I have four columns in my combo box and it enters the value of the first column. I want to keep the columns in the same order but enter values from the 2nd column not the 1st. I can only seem to do this by making my 2nd column the 1st column which I not wish to do. I want to see the four columns as they are and the first column will help decide what value I want from the 2nd column to be inserted. Hopefully it is quite simple.

  2. #2
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Not really sure what you are asking? Is this combo filling in something for you? Maybe something like: yourcomboname.Column(2) Do you not already know what the combo will show Is this a lookup combo, again unsure because of your unclear wording.

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,970
    If you want to save value from 2nd column then set the BoundColumn property to that column number.
    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.

  4. #4
    Narvic is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Mar 2013
    Posts
    12
    Hi Burrina/June7. Thanks for the reply, sorry if I did not make myself clear. This is a lookup combo looking at a table called Accessories. The combo is looking up 4 columns in the table, the first column is called "Action" the 2nd column is called "Item". I decide on the action I want and click that row it then enters the action I have clicked. But it is the "Item" column I want to enter on the form not the "Action" column. This only works if I make "Item" the first column which I do not want to do. I want to keep the combo columns in the order they are but enter the 2nd column not the first. I have tried making the bound column the 2nd column but it still enters the 1st column. I am sure access must be capable of doing this but I cannot work out how. It seems you can only enter whatever is in the 1st column. Hope you can help.

  5. #5
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Then move the fields around in your query for the lookup to your liking. And or change the Column(Number) as desired.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,970
    Narvic, what I suggested should work.

    Show properties of combobox:
    RowSource
    ColumnCount
    ColumnWidths
    BoundColumn
    ControlSource
    Last edited by June7; 03-26-2013 at 03:30 AM.
    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.

  7. #7
    Narvic is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Mar 2013
    Posts
    12
    Hi June7 below are the answers to your question.
    Row Source SELECT ACCESORIES.Action, ACCESORIES.Item, ACCESORIES.MinCh, ACCESORIES.PRICE FROM ACCESORIES;
    Column Count 4
    Column Widths 4cm;2.5cm;2.5cm;1cm
    Bound Column 1 (if I put the bound column to 2 it still enters the action column) The only way I can make it work is if I put "Item" in the first column. I do not wish to do this as anybody clicking on the combo I want them to read the action column first then enter the "Item" column.

    Control Source Item


    Hi Burrina The order I would like my fields in the combo box are "action" "item" "MinCh" "price". but I only want to enter the column "item".
    The only way I can make it work is if I put "Item" in the first column. I do not wish to do this as anybody clicking on the combo I want them to read the action column first then enter the "Item" column.
    No matter what settings I put in the property sheet it still enters the action column. Putting the bound column to 2 does not do it.
    Last edited by June7; 03-26-2013 at 09:10 AM.

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,970
    Can't explain. Guess next step is to provide db for analysis. If you want to, follow instructions at bottom of my post.
    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.

  9. #9
    Narvic is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Mar 2013
    Posts
    12
    Hi June7 I have been trying to send you a db for two days. I went to Advanced, clicked Attachment Manager. Clicked Add Files, Browse, found db and added it, then when I clicked Upload it twirled away indefinitely never completing the upload. The file is only 540kb. Am I doing something wrong. Is there another way to do this.

  10. #10
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Zip it up before you try to upload it.

    Can I ask a question, is the reason you don't want column 2 in the first position because of a a data sorting issue? If that's the case you can sort your columns however you want AND show them in whatever order you want. So let's say you have something like:

    Code:
    Group  Item  Field2  Field3
    A      DD    XXX     YYY
    A      EE    XXW     YYZ
    B      CC    JJJ     GGG
    B      DD    JJK     GGM
    If I understand what you're trying to do when someone reaches your combo box you want them to be able to start typing and as they're typing it would bring up values in the ITEM field, but show the columns as they are in my example. In other words when they reach your combo box you want them to be able to type D to get item 1 instead of A to get item 1. To me that's simply a sorting issue and if you modify the SQL statement you can get the sort you want and be able to have your ITEM (example) in the first column.

  11. #11
    Narvic is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Mar 2013
    Posts
    12
    I have zipped the files and they are only 25k but will not upload. Maybe it has something to do with me using windows8. All I would like is that when the combo box is clicked it shows two columns like the one below on the left. It will have aprox 40 rows and the operator will pick a row and the item value will be entered. It does not do that it enters the action value. If I change the columns round as in below right then it works but I want the columns in the order on the left but enter the item value. I would really like to send my files is there another way or could I send them to you by email.
    ACTION ITEM ITEM ACTION
    AAA PPP PPP AAA
    HHH RRR RRR HHH
    KKK YYY YYY KKK
    LLL ZZZ ZZZ LLL
    I want drop to look This works but I want
    like this but enter ACTION column on
    ITEM left

  12. #12
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    I don't think you can do what you want, however, if you have a data entry field for ACTION you can limit what appears in your ITEM combo box that are related only to the ACTION you've chosen.

  13. #13
    Narvic is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Mar 2013
    Posts
    12
    Hi rpeare thanks for the interest. There are no duplicate Items but there are duplicate Actions so I do not think your idea will help. I find it strange that access will not let you show the columns in the order you want. You can only seem to enter whatever is in the first visable column. If you make the first column width 0 then you can enter the next column. But that is no good if you wish to see the first column to make your choice. I will have to compromise and show the action column 2nd as I do not seem to have a choice. Thanks again.

  14. #14
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Why do you have duplicate actions for the same item? You could also do something like have your bound column be column 2 but when you make your choice have another texbox on your form that has a control source of something like =forms!formname!comboboxname.column(1)

    combo boxes, list boxes etc start at column 0 so in your case the second column is column 1.

  15. #15
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,970
    I finally fully comprehend what you were describing as the issue. I was thinking issue was the combobox wasn't saving the value from second column. True, the first visible column will be displayed in the box, however, this is not necessarily the value saved to the record.

    rpeare is suggesting dependent (cascading) comboboxes review http://datapigtechnologies.com/flash...combobox2.html

    You can upload to a fileshare site such as Box.com and post link to the file.
    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.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Grid Column Order in Datasheet view
    By apotter in forum Forms
    Replies: 3
    Last Post: 03-16-2012, 12:46 PM
  2. Replies: 8
    Last Post: 12-22-2010, 08:12 AM
  3. How to reset layout column order?
    By GLykos in forum Queries
    Replies: 0
    Last Post: 07-27-2010, 11:26 AM
  4. Column Order, Hidden, Name
    By Eightball3 in forum Forms
    Replies: 1
    Last Post: 06-30-2010, 12:35 PM
  5. Replies: 6
    Last Post: 05-11-2010, 02:22 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