Results 1 to 3 of 3
  1. #1
    Niki is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Apr 2011
    Posts
    32

    Filter or Query? Help!

    I have this starter table:

    Table 2IDFoodNameDescriptionBrandBrand IDVendor IDSrvg SizeCost/SrvgCaloriesProtein (g)Calcium (mg)Iron (mg)Vit A (IU)Vit C(mg)Total Fat (g)Sat Fat (g)SodiumSugar (g)Carbs (g)Fiber (g)Cholesterol(mg)Potassium (mg)Vitamin D (IU)BreadMeatVegFruitMilkFoodTypeNotes1Pizza - Cheese


    Schwans 78673

    1 slice$0.45300153501.83000113.56301537415190
    2.2510.125

    Protein
    2Broccoli
    NAT

    3/4 cup$0.21333.5153.820.941623.9687.280.470.0630.42
    5.973.390341.64


    1

    Veg
    3Strawberries
    USDA

    1/2 cup$0.261220.68140.753152.80.170.01430.6133.052.40125



    1
    Fruit
    4Milk - 1%



    8 oz$0.241208.22900.2347802.41.510712.712.7012.2366127



    1Milk
    5Spaghetti
    Pasta, Taco Meat, Sauce (USDA recipe nutrients)

    1 cup$0.3529515.84202.4200.47.381.46335242.576350
    11


    Protein
    6Green Beans
    USDA

    3/4 cup$0.20211.17270.9154414.80.1050.032100.9754.561.9501110

    1

    Veg
    7Orange



    1 orange$0.17621.23520.1329569.70.160.02









    1
    Fruit
    8Roll
    Homemade

    2 oz$0.041754.4229.271.700.14.190.629





    2



    Bread
    10Tunafish Sandwich on Bun
    Star Kist, Lite Hellmans & Merita WW

    1 sand$0.3818019601.44005.50.5630418330170401.31


    Protein
    11Sweet Potato Fries
    Homemade

    6 oz$0.25214.82.8947.632.93411941.914.650.03750.0841.650.080591


    1

    Veg
    12Ketchup
    Simply Heinz

    2 T$0.064000000003808500








    13Mixed Fruit
    Del Monte

    1/2 cup$0.20800002001.200515181085



    1
    Fruit
    15Meatloaf
    USDA recipe ????

    1 slice$0.4119517.05472.231542.910.294.22122
    81.367


    1


    Protein
    16Mashed Potatoes - 3/4
    Simplot (True)

    3/4 cup$0.121141.530.9450.555254.0422.52.761.725247.17019.51.57.50.930

    1

    Veg
    17Cherries
    USDA

    1/2 cup$0.20840.7611.340.51974.660.250.043.78
    21.80.880186.48



    1
    Fruit
    20Chicken Nuggets
    Goldkist

    5 nuggets$0.2817414301.981500924611120450
    11


    Protein
    21Ketchup
    Simply Heinz

    2 T$0.064000000003808500








    22Veggie Chili
    USDA (for now)

    1 cup (?)$0.3022314.573332.26125717.57.483.76606
    27.026.417



    1

    Veg
    23Banana - Med
    Raw - whole banana

    1/2 cup$0.201054.35.90.375.510.30.40.11.214.4273.104220


    1
    Fruit
    24Milk - Skim



    8 oz$0.248083000500000120121205366100



    1Milk


    I would like to create a query or filter that provides a list of all acceptable meals. An acceptable meal is at least 1 bread, 1 meat, 1 veg, 1 fruit & 1 milk. An acceptable meal is also in between 550-650 calories and has over 5000 IU's of Vit A. (there's more, but let's start there).

    How do I create a filter or query that says:

    1.) IF Bread > 1, Meat > 1, Veg > 1,> 1, Fruit > 1, Milk > 1,
    2.) THEN calories = 550-650
    3.) THEN Vit A > 5000

    And so on, and will return to me a list of all possible meal combinations that meet all the requirements?

    Thanks so much! (I'm not being neurotic here. This is for work - institutional food service.)

  2. #2
    Niki is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Apr 2011
    Posts
    32

    Sorry - my table didn't show up

    I would like to create a query or filter that provide a list of all acceptable meals. An acceptable meal is at least 1 bread, 1 meat, 1 veg, 1 fruit & 1 milk. An acceptable meal is also in between 550-650 calories and has over 5000 IU's of Vit A. (there's more, but let's start there).

    The way my food items are listed is "Pizza, Calories: 380, Vit A: 180, Bread: 2, Protein: 1, Veg: 1/8" or "Peaches, Calories: 70, Vit A 400, Fruit: 1"

    How do I create a filter or query that says:

    1.) IF Bread > 1, Meat > 1, Veg > 1,> 1, Fruit > 1, Milk > 1,
    2.) THEN calories = 550-650
    3.) THEN Vit A > 5000

    And so on, and will return to me a list of all possible meal combinations that meet all the requirements?

    Thanks so much! (I'm not being neurotic here. This is for work - institutional food service.)

  3. #3
    Niki is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Apr 2011
    Posts
    32
    Can I somehow define "Meal" as certain things and then ask Access to give me a report fulfilling those definitions?

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

Similar Threads

  1. Multi-Filter Query
    By jgelpi16 in forum Queries
    Replies: 3
    Last Post: 12-03-2010, 11:08 AM
  2. cbo to filter results from a query
    By nianko in forum Forms
    Replies: 5
    Last Post: 08-18-2010, 09:43 AM
  3. Combo box and filter query
    By thart21 in forum Forms
    Replies: 7
    Last Post: 04-06-2010, 11:37 AM
  4. Query filter statement
    By Brian62 in forum Access
    Replies: 1
    Last Post: 02-16-2010, 02:34 PM
  5. Criteria or Filter for Query
    By Ryan in forum Queries
    Replies: 1
    Last Post: 08-29-2009, 11:50 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