[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

Query Design Issue

Asked by netcepter in Microsoft Access Database

I really need some help.  I have some queries that I need to compare.  I will be as specific as i can.  If you guys can help me, I really would appreciated it.  Company needs badly!

I have two queries.  
#1 is BySectGroup
#2 is qryPartOpsView

BySectGroup is a query from a linked table.  that table is from notepad that another program creates.  There is no primary key to this.

qryPartOpsView  is a query that is completely normalized with tables.  PartOpersMerge is a many to many relationship to show parts in a certain operation and how many that are needed in that department.  Production enters what he thinks he needs.  It looks like this

CUSTOMER               PARTNO              Required          Field1          Field2
Boeing                      740-0468                 0                  20               Inject
Boeing                      740 -0468                0                   40              Wax
Boeing                       740-0468                30                 50              Cast

BySectGroup is a table that shows me where all the parts are each day and what section they are in.  It looks like this

PARTNO                 CUSTOMER                   TO (is equal to Field1)     SumOfQTY
740-0468               Boeing                          40                                       36
740-0468                Boeing                         50                                        10
740-0468                Boeing                          90                                        0

What I want to do is compare these two queries and create a report  I want Access to look at the requirment of 30 pieces  in operation 50, and compare it to the 10 pieces in operation 50 from the other query.  In otherwords bump the numbers from each query.  And if we are short, then I create smth that will change is color or whatever.  I can do the frills and thrills.  I just cant figure out how to connect these to queries.

Feel free to ask any questions.  I am desperate.  I have been working on this for a week.  I am running out of ideas.

The only way I can connect them is by the PARTNO.  I know this is bad for now, (txt datatype) but I cant do anything abt it yet.

Your help is much appreciated  I would buy you guys a car instead of points if you can figure this one out!!!

Thanks

Todd
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
qry #1
BySectGroup
SELECT [By Sect].PARTNO, [By Sect].TO, Sum([By Sect].QTY) AS SumOfQTY, [By Sect].CUSTOMER
FROM [By Sect]
GROUP BY [By Sect].PARTNO, [By Sect].TO, [By Sect].CUSTOMER
HAVING ((([By Sect].PARTNO)="740-0468-503 f"))
ORDER BY [By Sect].TO;
 
qry #2
qryPartOpsView
SELECT PartOpersMerge.PriKey, OperCodes.Field1, OperCodes.Field2, tblPartNumber.PARTNO, tblCustomer.CUSTOMER, PartOpersMerge.Required
FROM (tblCustomer INNER JOIN tblPartNumber ON tblCustomer.CUST_ID = tblPartNumber.CUSTOMER_FK) INNER JOIN (OperCodes INNER JOIN PartOpersMerge ON OperCodes.ID = PartOpersMerge.Opers) ON tblPartNumber.PART_ID = PartOpersMerge.PartNum;
[+][-]10/22/09 10:33 AM, ID: 25636787Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/22/09 10:46 AM, ID: 25636968Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92 - Hierarchy / EE_QW_3_20080625