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

    Establishing Limits

    I am putting together a menu that must have certain limits. For instance, a meal, that must consist of 1 meat, 1 veg, 1 fruit, 1 grain and 1 milk, must be between 550-650 calories and cannot cost over $1.10. How and where would I enter these limits?

    Also, is there a way to ask Access to look through all the data in my table and return all possible combinations of the meal requirements that fall within the limits?



    Thank you!

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    In all honesty Niki, the answer to this question is going to be quite long and drawn out unless you go ahead and start a process first and then come back with specifics about the actual issues that are happening.

    the short answer to both is ''YES YOU CAN''. (wow, now I'm sounding like Obama!)

  3. #3
    Niki is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Apr 2011
    Posts
    32
    Well, I have my info in my table - all the calories, nutrients and what catagory (meat, veg, fruit, grain or milk) it counts toward. I can filter it myself to pick one of each category to manually see whether or not it fulfills requirements, but I'd rather my computer do it.

    Once I have all my data in place, is it a complex query I need to explore to pull out the possibilities?

    Thanks!

  4. #4
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by Niki View Post
    Once I have all my data in place, is it a complex query I need to explore to pull out the possibilities?
    yes, it will be complex, regardless of your data structure here. That's my initial thought, simply because the criteria is multiple and not simply an input value.

    another thing, my actual first thought here was that you should be using Excel to do it. and you really should, IMO.

    But in terms of "IF" your querying is going to be complex, not complex, or simply impossible, that depends completely on your data and how you've got it in there. There can be no answer to that either, unless we see a structure of somekind. I'm assuming you have all that stuff in one table, based on what you said above.

    In Access, randomizing choices, such as what you suggested in the first post here, would more than likely make using of the RND() function in VBA, in addition to the RANDOMIZE statement in VBA.

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

    My brain is broken

    Attached is my database so far. It would be easier to formulate a query if the meal catagories where seperated (bread, meat, veg, etc), but some items are multiple catagories - chicken nuggets for example are bread & meat. So, can someone help me find a way to ask Access to, first, ensure the bread, meat, veg, fruit & milk components are there to make a complete meal, then ensure they meet the meal criteria (calorie limits, vitamins, etc) from sheet 1 and then spit out a list of meals to menu?

    Thanks!

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

Similar Threads

  1. Replies: 5
    Last Post: 09-20-2013, 08:36 AM
  2. Character Limits
    By nashr1928 in forum Reports
    Replies: 5
    Last Post: 12-08-2010, 01:29 PM
  3. Access 2003 Report Limits?
    By Stirling Steve in forum Reports
    Replies: 0
    Last Post: 08-09-2009, 02:23 AM
  4. Input limits
    By Hannu in forum Access
    Replies: 0
    Last Post: 08-31-2008, 03:02 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