Results 1 to 4 of 4
  1. #1
    msmithtlh is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    151

    Combo box for selection purposes only

    I have some forms that get the criteria for queries, then have a button to run the query.



    One of the fields on the form is a combo box for employee, so that the supervisor can select a specific employee for the data.
    This is working fine, except when you close the form, it "thinks" you are trying to save the employee record, and gives an error,

    "The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again."

    I understand the concept of duplicate records, but I haven't changed anything, so why does it "think" I'm creating another record. How can I get a selection-only combo box to look at my employee table? Thanks!!!

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Is your ComboBox "bound" to a field in the RecordSource of the form? If so, why?

  3. #3
    msmithtlh is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    151
    Yes it is bound to the employee table. I'm not sure how to do it as an unbound field. Help with that would be appreciated.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    You solved by unbinding the control? This means the control does not have ControlSource. Controls used only as means to input filter criteria should not be bound.
    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.

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

Similar Threads

  1. Replies: 3
    Last Post: 12-11-2012, 09:12 AM
  2. Replies: 1
    Last Post: 10-30-2012, 10:29 AM
  3. Replies: 1
    Last Post: 07-11-2012, 08:36 AM
  4. Replies: 33
    Last Post: 01-13-2012, 07:44 AM
  5. understanding excel for access purposes
    By metokushika in forum Programming
    Replies: 1
    Last Post: 10-24-2011, 11:51 PM

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