Results 1 to 3 of 3
  1. #1
    Hello1 is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    May 2015
    Posts
    32

    Some Questions

    Hello guys!
    I got one question. On the next picture u can see 2 tables (Seller and Orders) and the relationship between them. Now in "Seller" table in field "Number of sold phones" I would like access to count how many times is Sellers name and surname mentioned in the "Orders" table and then to put the number in "Number of sold phones". So, is that possible and if yes, how? Thanks!



    Click image for larger version. 

Name:	15.PNG 
Views:	10 
Size:	26.0 KB 
ID:	20757

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    You can create a Totals query by clicking the Sigma symbol in the upper right corner from within the Query Builder. Add fields from your table to the grid at the bottom of the designer window. You can add the Count() function to the desired field by changing Group By to Count.

    The trick here is to add only the fields that will affect the unique count desired. You may need to add subqueries to combine different count values. Another approach is to use a Report.

  3. #3
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Further to ItsMe's response, here are a few things to consider:

    -embedded spaces in field and object names will lead to syntax errors. It is better to use a naming convention that does NOT allow embedded spaces or non-alphanumeric characters in names.
    - in a typical Seller/Orders/Items data base set up, you would have an Order and OrderDetail table

    It seems you may be missing a table(s) since you would normally be Selling to a Customer/Client

    Seller ---->Customer--> Order---->OrderDetail<-----Item/Product

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

Similar Threads

  1. Begginer Questions
    By NoAlarms in forum Access
    Replies: 4
    Last Post: 04-11-2012, 07:58 PM
  2. QBF Questions
    By brandonze in forum Forms
    Replies: 2
    Last Post: 08-04-2011, 01:49 PM
  3. Questions Regarding Reports
    By rockrider in forum Reports
    Replies: 0
    Last Post: 02-01-2011, 03:29 PM
  4. List box questions
    By SteveL5231 in forum Forms
    Replies: 1
    Last Post: 12-15-2010, 08:43 AM
  5. Basic Questions
    By jlclark4 in forum Access
    Replies: 6
    Last Post: 12-13-2010, 12:09 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