Results 1 to 4 of 4
  1. #1
    Accessuser67 is offline Advanced Beginner
    Windows Vista Access 2010 32bit
    Join Date
    Dec 2012
    Posts
    35

    Design issue

    I have 3 tables, tbl1 is for receipts, tbl2 is for category and aisle and tbl3 is for store and address. What I want is a form to add data to the receipts table. In the form I have a lookup box based on tbl2, where when I enter the receipts I lookup the category for the item and I want the associated aisle to show up in the form after I select the category.

    how can I show this in the form?

    Regrds,


    ekmoorhead

  2. #2
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    Include the aisle in the combo box along with the category. If you look at the row source property of that combo box it should look something like this:

    SELECT category, aisle FROM tbl2

    Now, add another textbox control to your form. Set the control source so that it references the combo box. You can pull out any information you want from any column of that combo box using the following expression

    =comboboxname.column(x)

    where x= the column # of the field in the combo box's row source that corrsponds to the information you want to display. Access starts counting at zero, so if you want to display the aisle & assuming that the row source looks like I have shown above, the expression would be

    =comboboxname.column(1)

  3. #3
    Accessuser67 is offline Advanced Beginner
    Windows Vista Access 2010 32bit
    Join Date
    Dec 2012
    Posts
    35
    Thanks.

    However, I'm not good with VBA. Is there another way to show both values from the drop down box?

    regards
    ekmoorhead

  4. #4
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    There is no VBA in the solution I proposed. The SELECT...FROM.. is a query that can be built using the combo box wizard. The =comboboxname.column(x) is just an expression that you would type in the control source property of the textbox. You will have to substitute your actual combo box name in place of comboboxname

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

Similar Threads

  1. Database Design - Physical / Postal Address Issue
    By PeterPeterson in forum Access
    Replies: 3
    Last Post: 09-27-2012, 06:27 AM
  2. Design Issue: Custom Property?
    By Stan Denman in forum Database Design
    Replies: 2
    Last Post: 03-30-2012, 11:11 AM
  3. Replies: 1
    Last Post: 03-06-2011, 06:21 PM
  4. Replies: 2
    Last Post: 01-06-2011, 04:38 AM
  5. Database Design Issue
    By joekiteire in forum Database Design
    Replies: 6
    Last Post: 02-26-2009, 04:53 AM

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