Results 1 to 5 of 5
  1. #1
    b_rye_chan is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2015
    Posts
    18

    Combobox selections on Form are updating data

    I have a table tblContacts and a form frmEditSearch. frmEditSearch simply contains two combobox's, one for First Name and one for Last Name and a button that searches (runs a query) for a matching record in tblContacts. If I simply select the name from the combo box and hit Search, I get the resulting form to show up. However, if I select the name from the combo box and hit Enter, it changes the record in tblContacts. I've tried locking the combobox's but this makes it so that I cannot change the combo box selection or type in the cbo. I've tried changing the Form property for Allow Editing to 'No' and the same thing happens. How can I set it so that pressing enter does not change the data in tblContacts while allowing for new selections to be made in the cbo's?

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Are the "First Name" and "Last Name" combo boxes bound to the "First Name" and "Last Name" fields? The combo boxes should be unbound...

    I would have the combo boxes and the button in the form header..

  3. #3
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    In addition to Steve's comment, can you tell us in very simple terms
    ---What are you trying to do? Eg What do you have? What are you changing/trying to....?

    What is the purpose of the comboboxes?
    What is the rowsource of each combobox?

  4. #4
    b_rye_chan is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2015
    Posts
    18
    ok i feel dumb, I had them bound in a backup while testing, and unbound the cbo's in my test database but forgot to make that change in my main copy. problem solved. thanks ssanfu!

  5. #5
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    You are welcome...

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

Similar Threads

  1. Replies: 5
    Last Post: 06-14-2015, 07:56 PM
  2. Replies: 4
    Last Post: 08-25-2013, 07:43 AM
  3. Replies: 2
    Last Post: 02-13-2013, 09:45 AM
  4. Replies: 2
    Last Post: 09-08-2012, 08:25 PM
  5. dependent combobox selections
    By jle0003 in forum Forms
    Replies: 2
    Last Post: 05-15-2012, 12: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