Results 1 to 4 of 4
  1. #1
    Join Date
    May 2019
    Posts
    65

    Combo Box Displaying and Saving


    Access 2019.
    Here is my issue in English.

    When a form is opened, a Combo Box on the form should display the current value of "Field #1" given the current record in Table#1.

    When the Combo Box is dropped down it should display possible values of two fields from Table #2. When a selection is made the Primary Key (ID) from Table#2 should be saved to Field #1/Table#1.

    I can’t figure out how to save the value entered/or selected to the current record of Field#1. Do I have to use a Macro and a temporary variable?

    Any thoughts?
    Jeff

  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
    Can you post a copy of your database to the forum in zip format?

  3. #3
    Join Date
    May 2019
    Posts
    65
    I don't have that part done at this point. I have tried various scenarios like putting a combo box on a new form, defining the combo list from a table (which works) and then I tried to make the default value from another table. I'm sure I am missing something.
    I will try to explain it again.

    Table 1 - ShelterTable - Field #1 SContactUSE (This is a number value 1-999)
    Table 2 - Contacts - Field #2 - ContactID (Matches above)
    On my form I want to be able to start with the value for a record that is in SContactUSE (or if it's new, nothing), then I want to use the combo box to dropdown the ContactID and FullName. When I select a Contact then I want to save the ContactID in SContactUSE.

    Does that make sense?
    The information in the database is confidential and I don't have a current "dummy" to give you. I will probably work on that.
    Thanks for your reply.
    Jeff

  4. #4
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,114
    You need to set the record source property of the form to Table1, the control source property of the combo box to Field1 (sContactUSE) and the row source property of the combo box to "SELECT [ContactID], [ContactName] FROM CONTACTS Order By [ContactName];" and lastly set the column count of the combo to 2 and hide the first column (in the column width put 0';3').

    Cheers,
    Vlad

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

Similar Threads

  1. Replies: 3
    Last Post: 09-09-2018, 12:45 PM
  2. Replies: 6
    Last Post: 02-19-2014, 11:11 AM
  3. Combo box not displaying but is saving to the table
    By CT_AccessHelp in forum Forms
    Replies: 5
    Last Post: 01-10-2014, 03:23 PM
  4. Combo Box not saving to table
    By dgriffin in forum Forms
    Replies: 11
    Last Post: 06-08-2011, 03:04 PM
  5. Combo Box isnt saving
    By calisen in forum Access
    Replies: 0
    Last Post: 09-11-2008, 03:34 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