Results 1 to 6 of 6
  1. #1
    MedMos is offline Novice
    Windows 8 Access 2013
    Join Date
    Dec 2014
    Posts
    7

    Is any additional info saved when using a combobox in a form?

    Very new access user, largely selftaught, so please excuse any obvious errors or misuse of terminology.

    I've created a database (tbl1) and a form for dataentry. In this form I have a combobox getting options from a seperate table (tbl2). The row source for the combobox is both the primary key (ID) and a descriptive term from tbl2, with only the descriptive term being displayed in the box and in tbl1. My question is, is the ID from tbl2 saved along with the descriptive term somewhere, or if not, is there some way to refer the entries in tbl1 back to the corresponding ID in tbl2?


    I would like to use info from tbl2 to create a search form for my database, and it would be a lot easier if it is possible to link the descriptive term to the corresponding values in tbl2.
    Many thanks

  2. #2
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    India
    Posts
    616
    I've created a database (tbl1)
    You have created a table and not a database.
    The row source for the combobox is both the primary key (ID) and a descriptive term from tbl2, with only the descriptive term being displayed in the box and in tbl1
    You need to learn about table relationships. Read here https://support.office.com/en-za/art...2-2f6fb812b58f

    The value in the bound column (See the bound column property on Data tab in property sheet of the form in design view when the combo box is selected)will be stored in the table and the column widths property governs which columns are displayed. Typically, you should save the primary key of tbl2 in the tbl1. The tbl2 is the ONE side of One-To-Many Relationship between tbl1 and tbl2. The related fields should be of same type (Number/Text/Date)

  3. #3
    MedMos is offline Novice
    Windows 8 Access 2013
    Join Date
    Dec 2014
    Posts
    7
    I only wanted the combobox to display the descriptive term, so bound the coloumn to that. So I guess that is what is saved in tbl1, exclusively. Too bad.

    As for my added question: is there any way now to retrieve information from tbl2, based on the information in tbl1, having not wanted to create a relationship between the two?

  4. #4
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    India
    Posts
    616
    I only wanted the combobox to display the descriptive term, so bound the column to that. So I guess that is what is saved in tbl1, exclusively. Too bad.
    The data in a bound column is saved in the table.Other columns are for display only.
    As for my added question: is there any way now to retrieve information from tbl2, based on the information in tbl1, having not wanted to create a relationship between the two?
    Yes you can but you have to join the two tables on the common field so that the query can pull related rows from both tables where data based on it.

  5. #5
    MedMos is offline Novice
    Windows 8 Access 2013
    Join Date
    Dec 2014
    Posts
    7
    Ok, thanks. I'll make a backup and give it a try, the relations might get complicated as I actually have a couple of comboboxes pulling info from the same table.

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    See this link for a number of tutorials related to Access comboboxes
    http://www.techonthenet.com/access/comboboxes/

    For a good tutorial on tables and relationships work through this exercise from RogersAccessLibrary

    Good luck with your project

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

Similar Threads

  1. Replies: 8
    Last Post: 06-05-2014, 12:08 PM
  2. Replies: 3
    Last Post: 04-22-2014, 11:11 AM
  3. Replies: 3
    Last Post: 03-17-2014, 12:51 PM
  4. Redudent info in Combobox
    By JoeyB in forum Database Design
    Replies: 2
    Last Post: 12-10-2013, 11:15 PM
  5. Adding additional info to a hyperlink address
    By Greyhound in forum Access
    Replies: 4
    Last Post: 07-02-2012, 02:36 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