Results 1 to 2 of 2
  1. #1
    samot79 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2017
    Posts
    21

    Condition in Form


    Hi!

    I have a small database with three tables

    IngredientTable
    ID
    Ingredient
    Category

    RecipeTable
    ID
    recName

    Tables have a many-to-many relationship so I also have a conjunction table.

    Ingredient_RecipeTable
    IngredID
    RecID
    Qty

    Now I have a form where user may add ingredients to a recipe. Form shows all recipes and all ingredients that have been mapped which starts to get pretty long. I have added a combobox in forms header where user select which recipe he/she wants to edit, add new ingredients to a recipe or change existing ones.

    Problem I have now is that only want to show recipe user have select, but cant make this happen. I guess I have to write an SQL statement under events for Combobox?

    Help is very much appreciated.

    Thanks!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Options:

    1. intrinsic filter tools on the ribbon or right click filter on bound control - no code required

    2. intrinsic Filter by Form method - no code required http://www.keystonelearning.com/reso...ilter_by_form/

    3. use UNBOUND combobox to select recipe and VBA to build filter criteria and apply to form Filter property http://www.allenbrowne.com/ser-62.html
    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.

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

Similar Threads

  1. Where Condition when opening a form
    By NISMOJim in forum Programming
    Replies: 3
    Last Post: 08-18-2016, 07:20 PM
  2. opening a form when condition is met
    By webisti in forum Programming
    Replies: 2
    Last Post: 03-06-2014, 02:39 AM
  3. IF condition in a Macro on my form
    By Steven.Allman in forum Macros
    Replies: 1
    Last Post: 08-02-2013, 06:04 AM
  4. where condition with Navigation form
    By hyman in forum Forms
    Replies: 0
    Last Post: 10-31-2012, 02:39 AM
  5. Where Condition - form error
    By catat in forum Forms
    Replies: 5
    Last Post: 07-15-2010, 07:40 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