Results 1 to 8 of 8
  1. #1
    Join Date
    Nov 2008
    Posts
    3

    Click menu dish to show it's ingredients

    Hi all,

    The form Menu is a subform of Food Categories. While Menu and Food Categories are linked, Menu is further linked to Food Ingredients in a one to many relationship. Basically what am trying to do is be able to click on a button next to a dish name in the Menu form and the ingredients for that dish will pop up.


    The way I am currently doing it is by using a macro with a Where Condition of:
    Forms![Food Ingredients]!Menu_ID=Forms![Food Categories]!Menu.Form!ID
    So that only Food Ingredients entries who's matches that of the Menu ID will be listed. However, so far it doesn't work.

    Any help would be greatly appreciated!

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    The usual method of displaying a 1:M relationship is with a FORM/SUBFORM arrangement. The LinkChild/MasterFields properties take care of display for you.

  3. #3
    Join Date
    Nov 2008
    Posts
    3
    Hi RuralGuy,

    I realize that the use of Form/Subform would fix this problem. However, it seems to me that the underline relationship of linking parent/child form should be the same in this context and as such should be possible using a Where condition filter.

    Any idea why this isn't working in this case?

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I'll start you off with *very* useful link: http://www.mvps.org/access/lookupfields.htm

  5. #5
    Join Date
    Nov 2008
    Posts
    3
    Thanks. I took a look at the link, however, am not sure that is what am doing. And in any case, that doesn't answer the question of why isn't it working, but only of why you shouldn't do it ;-)

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Because LookUp fields do not show you what is really in the table, if you replace them with TextBoxes you may see what the problem is. In any event, ComboBoxes on a form can be used to do the LookUp for you.

  7. #7
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    BTW, I have looked at your db and two of your tables have Lookup Fields in them.

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Reported post #8 as SPAM

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

Similar Threads

  1. Click a record to display it for edit
    By mapl in forum Access
    Replies: 0
    Last Post: 11-24-2008, 03:02 PM
  2. Mouse click to open form
    By darryl.charles in forum Programming
    Replies: 0
    Last Post: 09-05-2008, 10:33 AM
  3. SWITCHBOARD MANAGER DISABLED ALL THE MENU AND EDIT OPTION
    By ranjit_dutt in forum Programming
    Replies: 0
    Last Post: 04-13-2007, 08:39 AM
  4. Startup Menu Greyed Out
    By slash75 in forum Access
    Replies: 0
    Last Post: 02-14-2007, 04:55 PM
  5. How about creating a drop down menu in a report?
    By beastmaster in forum Access
    Replies: 2
    Last Post: 12-29-2005, 01:01 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