Results 1 to 4 of 4
  1. #1
    lwhatford is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    2

    Mutiple records into a single record

    Hi, this may sound really silly but I can't work out what to do!



    I have two tables, one called "Sales" and the other called "Food".
    The Food table records a Food ID, Food Name, Price and category.
    The Sales table records a sales ID, the location and a customer loyalty id.

    I want to link the tables so that I can show the food items sold in a specific sale, so one sale might have been a piece of cake and a coffee.

    Any help on how I can do this??

    Thanks!

  2. #2
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    In order to do this, you will have to have a common field in the two tables with which to link them.
    For example, you might include a FoodID field in your Sales table.
    Then you will be able to get the results you want.

    Let me know if you need more help with this.

  3. #3
    lwhatford is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    2
    Ok thanks, that sorts the relationship, but when I am entering the data into the Sales table, how can I add multiple food items to each sale?

  4. #4
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,085
    Read up on Data Normalization. But real quickly you would have the following tables

    Sales
    SalesDetail
    Customers
    Locations
    Food

    Sales would contain the data for each sale. Customer, location, date
    Sales Detail would contain the detail information for each sale.

    Sales would have a 1 to many relationship to sales detail
    Sales would have a many to 1 relationship to customers and locations
    Sales Detail would have a many to one relationship to food items

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

Similar Threads

  1. Replies: 5
    Last Post: 08-29-2011, 05:17 PM
  2. Multiple records on a single page
    By neo651 in forum Forms
    Replies: 1
    Last Post: 06-29-2011, 10:21 PM
  3. Replies: 8
    Last Post: 01-21-2011, 10:28 AM
  4. Replies: 7
    Last Post: 10-08-2010, 09:48 AM
  5. Single Record Reports (HELP)
    By bnckeye27 in forum Reports
    Replies: 1
    Last Post: 11-13-2009, 02:14 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