?
Solved

ms access query calculate price

Posted on 2011-02-28
3
Medium Priority
?
264 Views
Last Modified: 2012-05-11
I have a parts table that has the guage of metal and type of metal to make a part.  I have a cost table that has costs which is dependent on guage and type.

Parts Table:
Parts    GA   Type
A1         12    H
A2          10    G

Cost Table:
Type  GA  Cost
H         07     1.25
H         10     1.00
H         12     0.75
G         07     1.50
G . . . . .

What is the best way to calculate the cost for each part - (I thought about a subselect query but have not done many)

Thanks for any help with this.
0
Comment
Question by:johnmadigan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 51

Accepted Solution

by:
Gustav Brock earned 668 total points
ID: 34997142
Bring the two table into a query in design view.
Create inner joins between GA and between Type of the two tables.

/gustav
0
 
LVL 15

Assisted Solution

by:derekkromm
derekkromm earned 668 total points
ID: 34997146
select p.Type, p.GA, c.Cost from Parts p inner join Cost c on p.Type = c.Type and p.GA = c.GA
0
 
LVL 12

Assisted Solution

by:Paul_Harris_Fusion
Paul_Harris_Fusion earned 664 total points
ID: 34997152
Create a query as follows:

Select P.Parts,  C.Cost
FROM
[Parts Table] P Inner Join [Cost Table] C
on P.GA = C.GA and P.[Type] = C.[Type]
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question