Results 1 to 2 of 2
  1. #1
    Dmosk319 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Mar 2014
    Posts
    1

    Question in Building an Expression

    Hi All-
    So I am trying to build an expression based off of invoices that I create for my catering company. Every item that a person orders requires certain utensils (ex.fork, knife, serving utensil etc.). So here is an example of an order and the utensils that each item should contain...

    • Sandwiches for 20 people- 20 Plates, 20 Knives, 2 Serving Tongs
    • Salad for 19 People- 19 Plates, 19 Forks, 19 Knives, 1 Serving Tong
    • Dessert for 17 People- 17 Plates, 17 Forks, 1 Serving Tong
    • Paper Goods for 20 People




    As you can see there can be an order for 20 people but they do not order each item for 20 people to save money. However, I still need to send enough utensils for 20 people. Now I need to create a formula that says based on this "Invoice #" the fields "Plates", "Forks", "Knives" are needed because of the items ordered but the quantity of the fields should be whatever the field "Paper Goods" says (in this case 20), and the field "serving tong" will be the sum of those 3 items

    So in the end I want to run a report for each day, grouped on invoice and it simply return the values
    • 20 Plates
    • 20 Forks
    • 20 Knives
    • 4 Serving Tongs



    Please help! And I thank anyone for their time and input

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Sounds like a lot of variables that would be difficult to build a single formula for. You could add tables that supported your formula. For instance, a utensil table could have a relationship with an orders table. I order a sandwich and the sandwich does not have a relationship with the record for forks so, I do not get a fork. But what happens when I order two bowls of soup? Do I get two spoons?

    I would use tables to support the formula and then use the GROUP BY operator to avoid multiple spoons for a single individual.

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

Similar Threads

  1. Building An Expression Help
    By Lisa Perry in forum Access
    Replies: 12
    Last Post: 06-19-2013, 10:44 AM
  2. Replies: 17
    Last Post: 01-16-2013, 08:22 PM
  3. Report Expression Building
    By KMac in forum Reports
    Replies: 7
    Last Post: 12-07-2012, 11:29 AM
  4. An Expression Builder Question
    By ddkolb in forum Reports
    Replies: 3
    Last Post: 06-03-2011, 04:51 PM
  5. Building a Difficult DateDiff Expression
    By jma108 in forum Queries
    Replies: 0
    Last Post: 06-15-2009, 12:39 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