Results 1 to 7 of 7
  1. #1
    rhewitt is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2012
    Posts
    74

    Use a multi-field combobox on a form to fill in a single value in a data table

    I have a form that allows users to see two names for the same record (scientific name and common name). The Control Source of the combobox is the Species_ID. The Species_ID is included in the multi combobox, but is hidden with columnWidth = 0. I'm unable to actually select anything in the drop-down menu. All of the names are present and correct, but the combobox won't set the value based on what I click.

    It seems like his might be a 'Type' issue. Obviously I'm selecting based on text fields, and the output needs to be a number. I've included the Species_ID in the combobox; how do I get the combobox to accept user input and enter the Species_ID value into the data table?



    A bit difficult to articulate, but I hope that gets the point accross.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,901
    Is the ColumnCount property set to 3?
    Is the Species_ID the first field in the RowSource query?
    Is the BoundColumn property set to 1?
    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
    rhewitt is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2012
    Posts
    74
    Column Count = 4

    Columns in Order; Column Width:
    1: Species_ID; 0
    2: Taxa; 0
    3: Common Name; 2.5
    4: Scientific Name; 2.5

    RowSource is dynamic, defined by After_Update event of cboTaxa:
    Code:
    cboSpecies.RowSource = "SELECT Species_ID, Taxon, CommonName, ScientificName " & _
        "FROM Species " & _
        "WHERE Species.Taxon = '" & cboTaxa & "'; "
    Bound Column = 1

  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,901
    Looks all okay.

    Now I suspect the form RecordSource. Is it table or query? If query, show the SQL statement.

    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.

  5. #5
    rhewitt is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2012
    Posts
    74
    Test.zip

    The form in question is called "jnctnSpeciesContact" under the Data Entry Forms tab of the Navigation Pane.

    This form enters data into a junction table for a many-to-many relationship.

    Thanks for taking a look!

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,901
    The Taxon combobox should be unbound - i.e., no ControlSource.

    There is no reason to include the Species table in the form's RecordSource, but if do, change the jointype to: 'Include all records from jnctnSpeciesContacts ...'

    The contact combobox is not set up correctly. The RowSource has only the name, not ID, however the bound field is for Contact_ID.
    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.

  7. #7
    rhewitt is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2012
    Posts
    74
    Quote Originally Posted by June7 View Post
    The Taxon combobox should be unbound - i.e., no ControlSource.

    There is no reason to include the Species table in the form's RecordSource, but if do, change the jointype to: 'Include all records from jnctnSpeciesContacts ...'

    The contact combobox is not set up correctly. The RowSource has only the name, not ID, however the bound field is for Contact_ID.
    Thanks! I'm really starting to get the hang of this now that I'm getting over some of the terminology hurdles.

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

Similar Threads

  1. Replies: 2
    Last Post: 08-31-2012, 02:20 PM
  2. Switch combobox from multi back to single
    By soulice in forum Access
    Replies: 1
    Last Post: 04-08-2012, 01:18 PM
  3. Multi-table Data entry form
    By halpme in forum Forms
    Replies: 3
    Last Post: 11-10-2011, 02:48 PM
  4. Replies: 1
    Last Post: 05-17-2011, 05:19 AM
  5. Multi value field - Combobox help
    By stougch in forum Forms
    Replies: 0
    Last Post: 10-19-2009, 10:47 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