Results 1 to 6 of 6
  1. #1
    DeanDB is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2019
    Posts
    2

    Question Edits to Value List are not persistent

    Hi, I'm new to this forum, and a bit green with Access.



    I had been able in the past to edit a Value List by typing data into the field and selecting Yes when the pop-up tells me "The text you entered isn't an item in the list. Do you want to edit the items in the list?" I've just realized now that when I choose Yes and add new items to the list in the Edit List Items window and click OK when I am done, that the additional items are not saved in the list. The drop-down shows the original items and when I scroll down through the list, but I do not see the new items I added.

    I am not sure what changed or why. Can anyone help me with this? I'm using Access 2019 on a Windows desktop running Windows 10.

    Thank you!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    Post your attempted code. This works for me. https://docs.microsoft.com/en-us/off...oBox.NotInList

    Adding items to ValueList RowSource is a design change of form. If you want new items to persist when form is reopened, have to save design changes. I've never used a user-editable ValueList RowSource and not seeing a way to save edit without DesignView.

    Suggest you build a table as source for these values.
    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
    Join Date
    Apr 2017
    Posts
    1,673
    As I never use listbox controls, I'm not sure, but with combos you can use the source table field the combo is based on as rowsource for combo (SELECT DISTINCT FieldName From SourceTable ORDER BY 1), with LimitToList property set to False. When wanted value is missing, user can simpliy enter it into combo, and after the record is saved, it is available for selection later. Maybe this option exists for listbox too?

  4. #4
    DeanDB is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2019
    Posts
    2
    Thanks for the replies to my question. Maybe a little more information would be helpful. I am by no means any sort of power user. The "database" that I am using was created using one of the Access Templates - the one for Home Inventory. So, I don't know what sort of code is being used for that. Some of the fields (specifically in my case the Location field) has a drop down in the form which allows choosing an existing Value List entry or adding a new one. Until just recently, I've been able to add new items, but now, even though I can go through the motions, the new values do not remain in the list when I open it up the next time. I'm not sure where I would get code to share here, or how I could implement recommended changes or additions to the code. Sorry to be so ignorant, I'm hoping to fix that too!

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    So what changed? Why were you able to add new items before?
    I just tested intrinsic Allow Value List Edits which does not use VBA and it worked. The annoying part of this is that user must respond to a 'Do you want to save changes' prompt.

    Listbox does not have a text input box so I presume you are using a combobox.
    The technique Arvil describes allows user to enter any value they want, misspellings and all.

    If you want to provide db for analysis, 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.

  6. #6
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,643
    Is it just the one combo box or does it affect all? Try adding a new combo box and see if it works. Rule out corrupt control.

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

Similar Threads

  1. Replies: 2
    Last Post: 09-22-2018, 06:41 PM
  2. Allow Value List Edits from cbobox
    By MdHaziq in forum Access
    Replies: 4
    Last Post: 01-19-2018, 07:57 PM
  3. Additional Value List edits erasing previously entered fields
    By rshepard@shepardsearch in forum SharePoint
    Replies: 2
    Last Post: 06-27-2017, 07:19 AM
  4. Replies: 1
    Last Post: 03-19-2016, 03:56 AM
  5. Persistent .ldb
    By knarfreppep in forum Programming
    Replies: 1
    Last Post: 02-11-2015, 03:32 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