Results 1 to 10 of 10
  1. #1
    k_rasuri is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2012
    Posts
    6

    Events on another table

    Hi..I'm totally new to MS Access. I have some programming experience though. I would like to know how to invoke an event on another table. When ever an user enters or updates a record in tblA, i have to update tblB with some calculated values. I have searched a lot but i didnt find anything related. though i would get some quick help. thanks

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Unless you have some rare and unusual circumstances, you do NOT store calculated values in Tables.
    If you can do the calculation via a query, then the "best practice" is to use the query whenever the calculation is needed.

  3. #3
    k_rasuri is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2012
    Posts
    6
    Sorry for calling it a calculation. I have some data loaded into a table. when ever this action happens i want to store some related data in some other table. Is there a way to do this. I think i should do it with macros. don;t know exactly how to do that. any reference to a link, tutorial will be helpful.

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Why macros? Can you show us an example with some real values? Once we understand your situation, others may post some options/alternatives.

  5. #5
    k_rasuri is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2012
    Posts
    6
    I think append query works better for my case. I basically want to create some kind of query on the main tables and load it into a report table. thanks for replying

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    ??? report table

    Maybe you should tell us in plain English WHAT exactly you are trying to do in business terms.

  7. #7
    k_rasuri is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2012
    Posts
    6
    May be this is a design issue. Here is what i have

    I have 3 tables Batch, Product, Orders. the realtionship is something as below

    BatchID ProductID OrdersQuantity, OrderDate
    B1 P1 20 8/3/2012
    B1 P2 10 8/3/2012
    B1 P3 12 8/3/2012

    to make those products we have a tracking sheet which will give information about how many order we need to process in a batch. from the above data we see that in batch B1 i need to process 42 orders. lets say that it takes 45 mins to make these products. so i want to store this information in another table

    Batch OrderQty Idealtimetoprocess Actualtimetoprocess
    B1 42 45 50

    This is the report table i want to create. I want to store it physically in a table because, i want to store the information about actualtimetoprocess. this will be entered by the line managers once they have processed the orders.

    I don't know if this is the right way to do. Please let me know if you think there is a better way to design this

  8. #8
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Can you describe Batch and Order and Product?

    In many situations you have a
    Customer places an Order for Product on a specificDate.

    You would have
    CustomerTbl
    OrderTbl
    OrderDetailTbl
    ProductTbl


    see http://www.databaseanswers.org/data_...ders/index.htm for a free data model.

    If you want to see the whole process in free video tutorial, then

    Here is a list of free video tutorials that may help. Related to Customers, Order, Items.

    http://www.youtube.com/watch?v=IiVq8M5DBkk Logical data modeling

    http://www.youtube.com/watch?v=BGMwuOtRfqU Candidate key

    http://www.youtube.com/watch?v=ZiB-BKCzS_I Normalization

    http://www.youtube.com/watch?v=pJ47btpjAhA Normalization example

    http://www.youtube.com/watch?v=q3Wg2fZENK0 1st Normal form

    http://www.youtube.com/watch?v=vji0pfliHZI 2nd Normal form

    http://www.youtube.com/watch?v=HH-QR7t-kMo 3rd Normal form

    http://www.youtube.com/watch?v=q1GaaGHHAqM E_R Diagramming

    http://www.youtube.com/watch?v=lXAGQ8vmhCY ERD Part 2

  9. #9
    k_rasuri is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2012
    Posts
    6
    Thanks for all the help orange. Those links are very informative.

  10. #10
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    The nice thing is, you can go back and review them, or pause, go back a little and watch it over again.

    Good luck with your project

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

Similar Threads

  1. Writing Code for "After Update" Table Events
    By dipique in forum Programming
    Replies: 10
    Last Post: 07-09-2012, 08:11 AM
  2. Following Environmental Events
    By seaape in forum Database Design
    Replies: 4
    Last Post: 06-23-2011, 06:17 PM
  3. Events are "Non-Events"
    By caddcop in forum Forms
    Replies: 4
    Last Post: 04-07-2011, 10:08 PM
  4. Different Events
    By jo15765 in forum Programming
    Replies: 2
    Last Post: 12-07-2010, 12:45 PM
  5. Events Confusion?
    By homerj56 in forum Programming
    Replies: 5
    Last Post: 10-27-2010, 01:45 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