Results 1 to 3 of 3
  1. #1
    bbdsbd is offline Novice
    Windows 8 Access 2013
    Join Date
    Jul 2015
    Posts
    4

    Unhappy Storing data calculated in a query in a table

    Hello, we are creating a new stock control system in access converting our old excel system but we are having problems with certain mechanics.
    Our system currently looks at a table with orders in and finds the product code. The occurrence of the product code in the orders table is then counted to give a sum of sales for each individual product.

    Click image for larger version. 

Name:	4.png 
Views:	9 
Size:	15.3 KB 
ID:	21435
    We would like to use this count of products to mark off stock components. But we are unsure how we would display this ‘used’ to the end user. We would like a total number of products sold to appear in a column in our products table which is separate to the sales table.Click image for larger version. 

Name:	3.png 
Views:	9 
Size:	128.5 KB 
ID:	21436


    Would we use an update query to push the data to this column or is there another way to store the data outside of a query?


  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I recommend revisiting your table structure before you continue. It seems you are "committing spreadsheet" and your data is not "Normalized". You will always have trouble creating queries and maintain your data if your tables do not follow the rules of normalization. Perhaps you can start by creating an ERD and also work through various tutorials on Relational Database.
    https://www.youtube.com/watch?v=-fQ-bRllhXc

  3. #3
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    Specific information regarding your product should all be in one table. If you want to use this information elsewhere you need to reference to it using primary/foreign keys.

    Each product needs a primary key. A sequential auto number is easiest. Then other tables, like the one you have for sales would use that key to add whatever other information you want. It's hard to explain but follow the link Its me sent you and if you have any questions post them.

    Andy,

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

Similar Threads

  1. Accessing, storing, and using data in query fields
    By faythe1215 in forum Programming
    Replies: 7
    Last Post: 04-08-2015, 12:42 AM
  2. Replies: 19
    Last Post: 12-06-2013, 04:47 PM
  3. Replies: 11
    Last Post: 06-02-2013, 10:42 PM
  4. Replies: 4
    Last Post: 10-14-2012, 04:06 PM
  5. Storing Calculated Value (special senerio)
    By robsworld78 in forum Forms
    Replies: 5
    Last Post: 07-11-2011, 10:17 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