Results 1 to 4 of 4
  1. #1
    vkumar is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2012
    Posts
    30

    Smile Need help with drop down list in access

    I have a drop down list in a table with name and commission rate. When I choose the name it displays but I want both the name and the commission rate to display in my table. I want to use a data entry form to enter values in the table and I want the same in the form too (when I choose a name I want the corresponding commission rate to show up). Thank you for your help

  2. #2
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    Although Access has the capability of having lookup fields in the tables, it is generally not a good idea to use them. This site explains the problems the table level lookups can cause. Also you should not be repeating information that is stored in one table in a second table,you would just use a foreign key that joins the information in the two tables.

    The Lookups (combo/list boxes) are best left for forms.

    If you bring the commission rate into the combo box, you can use another textbox control on your form to reference any information you brought in via the combo box using an expression: =comboboxname.column(x) where x= the column number in the combo's row source property that holds the data. Note: the columns in the combo box's row source start counting at zero not 1

    So if the row source was: SELECT salespersonname, commissionrate FROM tablename, the column number for the commission rate would be 1.

  3. #3
    vkumar is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2012
    Posts
    30

    Thank you for your reply. I have changed my form and it is working now.

    Thank you for your reply. I have changed my form and it is working now.
    Quote Originally Posted by jzwp11 View Post
    Although Access has the capability of having lookup fields in the tables, it is generally not a good idea to use them. This site explains the problems the table level lookups can cause. Also you should not be repeating information that is stored in one table in a second table,you would just use a foreign key that joins the information in the two tables.

    The Lookups (combo/list boxes) are best left for forms.

    If you bring the commission rate into the combo box, you can use another textbox control on your form to reference any information you brought in via the combo box using an expression: =comboboxname.column(x) where x= the column number in the combo's row source property that holds the data. Note: the columns in the combo box's row source start counting at zero not 1

    So if the row source was: SELECT salespersonname, commissionrate FROM tablename, the column number for the commission rate would be 1.

  4. #4
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    You're welcome. Glad to hear that you got the form working!

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

Similar Threads

  1. Drop Down List
    By haazzaa in forum Forms
    Replies: 3
    Last Post: 03-19-2012, 05:17 PM
  2. How to get key for drop-down list
    By mitchmcc in forum Access
    Replies: 2
    Last Post: 11-29-2011, 06:21 AM
  3. drop down list
    By slimjen in forum Access
    Replies: 6
    Last Post: 09-15-2011, 01:43 PM
  4. Replies: 4
    Last Post: 06-16-2011, 09:30 PM
  5. No drop down list in Access?
    By snorkyller in forum Forms
    Replies: 5
    Last Post: 03-21-2011, 03:28 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