Results 1 to 12 of 12
  1. #1
    alynch is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2019
    Posts
    6

    combo box that allows edits but does not add to list


    I am attempting to create a combo box for patient treatments (i.e. "Arm weights, R hand _lbs L hand _lbs"), however I would like to enable the goals to be edited after selecting from the drop down list ("Arm weights, R hand 3lbs L hand 2lbs"). I am able to create the list items in either a value list or a separate table, and that works fine, except that I can't edit the information without adding to the list.
    Is there a way to set up a combo box in a Table so that it has a list of drop-down options, but whatever you select or type in is entered into the table as separate text, and doesn't affect the combo box list at all? Basically, it makes a copy of the drop down text and puts it into the text field so I can then edit it in any way I want.
    Thank you for your time.

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Sounds like you are trying to do something with a combo that it wasn't designed for. Once the row source is created (be that value list or table or query based on a table) it becomes the list items as you've no doubt discovered. To add to the list with the Not In List event is fine, but to edit the list you should be going back to the source- and the source should have a primary key that does not change when the combo's displayed value is edited. If you bind this combo to a field and alter a value in the list after you've stored it, you can cause all kinds of problems. I'm not understanding why you don't just have R hand 3lbs and R hand 2lbs in the list. You can alter the combo value if it's bound to a field as long as the Limit To List property is not set to Yes/True, but as I said, you might cause issues down the road. Ideally, you would have a form for editing/appending values in lookup tables (not lookup fields in tables) or a form that does this for all such tables if there aren't too many of them.
    Last edited by Micron; 12-06-2019 at 06:44 PM. Reason: clarification
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,388
    Well, you could have the combobox after_update event insert its value into a textbox on the form. That textbox is bound to a field in the table. You could alter the value of the textbox and it would be saved to the table with that value.

  4. #4
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Could someone explain to me why, if I chose "Arm weights, R hand 3lbs L hand 2lbs" from a combo today that I would want to make that "Arm weights, R hand 7lbs L hand 6lbs" next week by using a combo? What if the patient regresses - put it back to some number you had before?

    Wouldn't you have a combo for R hand and a textbox beside it where you change the number from 3 to whatever? Either that, or a list item for every pound value for each hand, which reinforces the idea that the combo is wrong for this. I am probably missing something, because I don't get it.

  5. #5
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    There is an old, proven technique with relational database --1 fact 1 field -- that works great.
    User interfaces on the other hand are under no such -guiding rule - or, if any, it would be "to each his/her own".
    There are many goals - or so it seems- with user interfaces/forms, that include:
    -simplification
    -each of use
    -pretty colours
    -more fonts, colours, shapes and positions than necessary
    -confusion
    -designer outsmarts himself/herself
    -unintended/intended complexity
    -good examples of bad examples, and
    -total obfuscation. (among unknown others).

    Not sure which one ( ones) apply, but if the goal were stated upfront, we could focus advice.
    Good luck with your project.

  6. #6
    alynch is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2019
    Posts
    6
    Thank you, this is exactly what I was looking for!

  7. #7
    alynch is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2019
    Posts
    6
    Quote Originally Posted by Micron View Post
    Could someone explain to me why, if I chose "Arm weights, R hand 3lbs L hand 2lbs" from a combo today that I would want to make that "Arm weights, R hand 7lbs L hand 6lbs" next week by using a combo? What if the patient regresses - put it back to some number you had before?

    Wouldn't you have a combo for R hand and a textbox beside it where you change the number from 3 to whatever? Either that, or a list item for every pound value for each hand, which reinforces the idea that the combo is wrong for this. I am probably missing something, because I don't get it.
    Each entry is dated, to create a history - so if 12/1 the intervention was 3 lbs, but on 1/1 they had improved to 4 lbs, I would be able to enter the updated intervention with a new date & wt amount without having to retype "Arm weights, ...." over again. I'm looking for speed and continuity in the documentation.

  8. #8
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,388
    Quote Originally Posted by alynch View Post
    Thank you, this is exactly what I was looking for!
    I'm sure whoever it was that helped thanks you very much. Good luck with the project!

  9. #9
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    If you want to allow freeform input then set combobox LimitToList property to No. Users can type whatever they want.

    I have comboboxes that use data table as source for lists (not a lookup table). The fields are freeform entry, users can type whatever they want but as they type the combobox list shows previous similar inputs they can accept or alter as they wish. For example:

    SELECT DISTINCT Source FROM SUBMIT WHERE Source Is Not Null;

    Lists items like:
    Source
    11195 Lang St. / AS&G
    15 Mile Pit / Akutan / Knik Construction
    15 Mile Pit / Knik Construction
    15 mile Pit / Platinum / Knik Construction
    20850 Birchwood Spur Rd. / AS&G
    20850 Birchwood Spur Rd. / Granite
    20850 Birchwood Spur Rd./ 11195 Lang St. / AS&G
    3.6 Mile Bogard Road / QAP
    4.5 Mile Kiana Pit
    4.5 Mile Pit, Haines Highway
    42 Mile Pit/QAP
    48th Avenue/AIC/Granite
    4th July Creek Quarry/AIC
    5 Mile Quarry
    615+50 Hollis Highway
    A Street
    AAA Gravel Products / ARB
    AAA Gravel Products / ARB / Scarsella
    AAA Gravel Products/Scarsella Bros.
    AAA Valley Gravel / CRUZ Construction
    AAA Valley Gravel / Tutka LLC
    AAA Valley Gravel /AK Frontier Services
    The combobox RowSource can be a lookup table to provide standard set of options to accept/edit or can use destination table and requery combobox after each entry. In either case they can type whatever they want.
    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.

  10. #10
    alynch is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2019
    Posts
    6
    Quote Originally Posted by davegri View Post
    Well, you could have the combobox after_update event insert its value into a textbox on the form. That textbox is bound to a field in the table. You could alter the value of the textbox and it would be saved to the table with that value.
    Thank you, this is exactly what I was looking for!

  11. #11
    alynch is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2019
    Posts
    6
    I like this idea, except I want to be able to "fill in the blanks" rather than have to type in anything. I think a combination of this and the after_update event to fill in a text box will be the best solution. Thanks!

    Quote Originally Posted by June7 View Post
    If you want to allow freeform input then set combobox LimitToList property to No. Users can type whatever they want.

    I have comboboxes that use data table as source for lists (not a lookup table). The fields are freeform entry, users can type whatever they want but as they type the combobox list shows previous similar inputs they can accept or alter as they wish. For example:

    SELECT DISTINCT Source FROM SUBMIT WHERE Source Is Not Null;

    Lists items like:
    Source
    11195 Lang St. / AS&G
    15 Mile Pit / Akutan / Knik Construction
    15 Mile Pit / Knik Construction
    15 mile Pit / Platinum / Knik Construction
    20850 Birchwood Spur Rd. / AS&G
    20850 Birchwood Spur Rd. / Granite
    20850 Birchwood Spur Rd./ 11195 Lang St. / AS&G
    3.6 Mile Bogard Road / QAP
    4.5 Mile Kiana Pit
    4.5 Mile Pit, Haines Highway
    42 Mile Pit/QAP
    48th Avenue/AIC/Granite
    4th July Creek Quarry/AIC
    5 Mile Quarry
    615+50 Hollis Highway
    A Street
    AAA Gravel Products / ARB
    AAA Gravel Products / ARB / Scarsella
    AAA Gravel Products/Scarsella Bros.
    AAA Valley Gravel / CRUZ Construction
    AAA Valley Gravel / Tutka LLC
    AAA Valley Gravel /AK Frontier Services
    The combobox RowSource can be a lookup table to provide standard set of options to accept/edit or can use destination table and requery combobox after each entry. In either case they can type whatever they want.

  12. #12
    alynch is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2019
    Posts
    6
    The main goal is to ensure standardization of documentation in a dummy-free way. Yes, I want "1 fact - 1 field" for the client records (which is why each record also has a date field), but I'd like a template for what is entered into the field. Thanks for bringing this up, it helped me solidify my intention.

    Quote Originally Posted by orange View Post
    There is an old, proven technique with relational database --1 fact 1 field -- that works great.
    User interfaces on the other hand are under no such -guiding rule - or, if any, it would be "to each his/her own".
    There are many goals - or so it seems- with user interfaces/forms, that include:
    -simplification
    -each of use
    -pretty colours
    -more fonts, colours, shapes and positions than necessary
    -confusion
    -designer outsmarts himself/herself
    -unintended/intended complexity
    -good examples of bad examples, and
    -total obfuscation. (among unknown others).

    Not sure which one ( ones) apply, but if the goal were stated upfront, we could focus advice.
    Good luck with your project.

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

Similar Threads

  1. Edits to Value List are not persistent
    By DeanDB in forum Access
    Replies: 5
    Last Post: 11-13-2019, 06:55 PM
  2. Replies: 2
    Last Post: 09-22-2018, 06:41 PM
  3. Allow Value List Edits from cbobox
    By MdHaziq in forum Access
    Replies: 4
    Last Post: 01-19-2018, 07:57 PM
  4. Additional Value List edits erasing previously entered fields
    By rshepard@shepardsearch in forum SharePoint
    Replies: 2
    Last Post: 06-27-2017, 07:19 AM
  5. Replies: 1
    Last Post: 03-19-2016, 03:56 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