Results 1 to 6 of 6
  1. #1
    dunc723 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2013
    Posts
    28

    Multiple Values in Combo Box not working


    Hi,

    I have combo box on a form for which I want to allow multiple item selection. I have set the Allow Multiple Values property = Yes for that field in the table design. When you click the combo box on the form, it appears as a list with check boxes and OK/Cancel. When I select one or multiple items and click OK, I get an error, "Object invalid or no longer set".

    I only get this error for a field that allows multiple values - if I change the Control Source in the same combo box to a field where Allow Multiple Values = No, it works fine.

    I do not get the error when entering directly in the table.

    If I add a new combo box and set the control source to the same field, the same thing happens. If I add a new field to the table and set to Allow Multiple Values, the same thing happens.

    I have another form and table in the same database that does not have this problem. I've tried to make sure all properties in both the table design and form design are the same.

    Microsoft's online help says this:

    You are attempting to reference an object that is no longer valid or has not been set.
    Possible causes:

    • The object has been closed.
    • The object has been orphaned (the parent object has been closed or deleted).
    • The object is out of scope.
    • The object library is not registered in the Microsoft Windows Registry.
    • You are trying to reference a method or property of the collection, but you have not assigned it to a variable first.

    Any ideas?

    Thanks,

    Pete

  2. #2
    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,722
    I recommend that you review this and do not deal with multiple valued fields.

    Here is a video (no audio) that may be useful if you decide to use MVF.

  3. #3
    dunc723 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2013
    Posts
    28
    Thanks, but the first article did not say anything about multi-value fields, and I am not using any lookups. I am only using a simple query to populate the value list (no problem, the right values are appearing), and only storing the actual text values selected.

    While the video had a couple of useful tidbits, it still does not address my issue.

  4. #4
    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,722
    Suggest you post a copy of the database.

    Perhaps you could describe your issue in more specific terms. An example could be useful for readers.

  5. #5
    dunc723 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2013
    Posts
    28
    I found the problem, not related to the table design, form or control design. The database is split, and somehow the back-end table and the front-end linked table got out of sync. I was never looking at the linked table so didn't realize it was defective. I only had to refresh the linked tables in the front end and all is well.

  6. #6
    Micron is online now Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,793
    Make sure you need mvf's before deciding to stick with them. Not having dealt with Access & SharePoint lists, which is about the only good reason to use them, I'm biased against their usefulness. Too often, they are used as a crutch to prop up poor db design. If you read here you could learn of some of their pitfalls. Note that Issue 1 is missing from the first result set even though there is a person involved in that record. For some, the inability to migrate a db with mvf's to other db platforms such as MySql is a big reason not to use them.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 5
    Last Post: 11-19-2017, 12:28 PM
  2. Saving multiple values in look-up combo box
    By AnnSparks in forum Database Design
    Replies: 5
    Last Post: 01-23-2015, 02:18 PM
  3. Replies: 2
    Last Post: 08-12-2013, 05:47 PM
  4. Replies: 4
    Last Post: 01-31-2013, 05:29 AM
  5. Multiple Combo box - duplicating values
    By Haleakala17 in forum Forms
    Replies: 2
    Last Post: 09-18-2012, 06:26 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