Results 1 to 3 of 3
  1. #1
    sesproul is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Posts
    50

    Update a column in each Row based on calculation

    Hello,

    Here's the issue. Parts made out of different gauge material. Need the information to calculate shipping weights.

    Parts table
    =========
    Partno, FKMaterialID, AREA, Weight

    Material Table
    ===========
    MaterialID
    WeightPerArea

    I gave the Parts table populated, and a materialID selected. How do I run a query to update each row's Weight Column to equal Material.WeightPerArea*Parts.AREA

    I know it should be straight forward, but I'm running into a wall on this one.


    thanks

    Steve

  2. #2
    maximus's Avatar
    maximus is offline Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Aug 2009
    Location
    India
    Posts
    931
    link FKMaterialId of the Parts table with MaterialId of Materials Table. (I think you have already done that if not do it)
    Open a query in design View.
    From the Menu Bar-Query-Select Update Query.
    From Table List Select Both Tables Parts and Materials.
    In First Column Select Weight From the Parts Field.
    In its UpdateTo Row Type the following code:
    ([material].[WeightPerArea])*([Part].[Area])
    Close and save the update query.
    Now Run the query.
    You will get the result that you want.

    if this solves your problem please mark this thread to be solved.

  3. #3
    sesproul is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Posts
    50
    Thanks for the help - Worked great! Really saved my morning.


    Steve

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

Similar Threads

  1. Replies: 3
    Last Post: 02-10-2010, 07:29 AM
  2. Update 2 fields based on where condition.
    By Confused in forum Access
    Replies: 2
    Last Post: 11-19-2009, 05:21 PM
  3. duplicate record based on calculation
    By Coolpapabell in forum Queries
    Replies: 4
    Last Post: 08-06-2009, 07:53 AM
  4. update table in loop based on IF statement
    By LALouw in forum Access
    Replies: 0
    Last Post: 07-26-2009, 08:46 PM
  5. inserting values in column based another column
    By wasim_sono in forum Database Design
    Replies: 1
    Last Post: 06-27-2006, 05:23 AM

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