A query based on a query and a Link table - Problems connecting

G

Guest

I have a link that a table is based off of. I have a simple query that reads
all the information. Now I want to connect the simple query to a table so
they are communicating. SELECT tblData.TicketNum, [RSM-Recv Query].Bins,
[RSM-Recv Query].CullP, [RSM-Recv Query].BrineP, [RSM-Recv Query].P080,
[RSM-Recv Query].P085, [RSM-Recv Query].P090, [RSM-Recv Query].P095,
[RSM-Recv Query].P100, [RSM-Recv Query].P105, [RSM-Recv Query].P110,
[RSM-Recv Query].P115, [RSM-Recv Query].P120, [RSM-Recv Query].P130
FROM tblData RIGHT JOIN [RSM-Recv Query] ON tblData.TICKETNUM = [RSM-Recv
Query].TicketNum
GROUP BY tblData.TicketNum, [RSM-Recv Query].Bins, [RSM-Recv Query].CullP,
[RSM-Recv Query].BrineP, [RSM-Recv Query].P080, [RSM-Recv Query].P085,
[RSM-Recv Query].P090, [RSM-Recv Query].P095, [RSM-Recv Query].P100,
[RSM-Recv Query].P105, [RSM-Recv Query].P110, [RSM-Recv Query].P115,
[RSM-Recv Query].P120, [RSM-Recv Query].P130;
Could someone please look over it and let me know what is wrong? Thanks
Zenia
 
M

Michel Walsh

Hi,


A GROUP BY query is not updateable.

Once you have a query, you can use it "as if" it was another table (in the
query designer, as example) as long as joining them is concerned.

I am not sure about what "communication" between a query and table can be,
exactly, so, I assumed it was a kind of lookup ( join); if it is about
update the table from the query, as said in the first paragraph, you are out
of luck.


Hoping it may help,
Vanderghast, Access MVP
 
G

Guest

Ok so how would you handle a situation like this. I have a linked table that
I turned into a query. I want the query (A) and table (A) to make another
query where the lot number and the grower number reuturn the same value from
the linked table --- Please say there is a way!!!! Thanks

Michel Walsh said:
Hi,


A GROUP BY query is not updateable.

Once you have a query, you can use it "as if" it was another table (in the
query designer, as example) as long as joining them is concerned.

I am not sure about what "communication" between a query and table can be,
exactly, so, I assumed it was a kind of lookup ( join); if it is about
update the table from the query, as said in the first paragraph, you are out
of luck.


Hoping it may help,
Vanderghast, Access MVP


esparzaone said:
I have a link that a table is based off of. I have a simple query that
reads
all the information. Now I want to connect the simple query to a table so
they are communicating. SELECT tblData.TicketNum, [RSM-Recv Query].Bins,
[RSM-Recv Query].CullP, [RSM-Recv Query].BrineP, [RSM-Recv Query].P080,
[RSM-Recv Query].P085, [RSM-Recv Query].P090, [RSM-Recv Query].P095,
[RSM-Recv Query].P100, [RSM-Recv Query].P105, [RSM-Recv Query].P110,
[RSM-Recv Query].P115, [RSM-Recv Query].P120, [RSM-Recv Query].P130
FROM tblData RIGHT JOIN [RSM-Recv Query] ON tblData.TICKETNUM = [RSM-Recv
Query].TicketNum
GROUP BY tblData.TicketNum, [RSM-Recv Query].Bins, [RSM-Recv Query].CullP,
[RSM-Recv Query].BrineP, [RSM-Recv Query].P080, [RSM-Recv Query].P085,
[RSM-Recv Query].P090, [RSM-Recv Query].P095, [RSM-Recv Query].P100,
[RSM-Recv Query].P105, [RSM-Recv Query].P110, [RSM-Recv Query].P115,
[RSM-Recv Query].P120, [RSM-Recv Query].P130;
Could someone please look over it and let me know what is wrong? Thanks
Zenia
 
M

Michel Walsh

Hi,


In the query designer, bring both tables or both queries ( or one table and
one query) and JOIN the fields to be "matched" by dragging the field from
one table (or query) and dropping it on the other table (or query). That
makes an INNER JOIN. Note that an inner join find all MATCHes, so if one
table have two records with the same value under the joined field, and the
other table have 3 same values, that makes a total of 6 (2 * 3) possible
matches. If one of the table has no duplicated values for one of the joined
field, that kind of "explosion" does not occur.


Hoping it may help,
Vanderghast, Access MVP

esparzaone said:
Ok so how would you handle a situation like this. I have a linked table
that
I turned into a query. I want the query (A) and table (A) to make another
query where the lot number and the grower number reuturn the same value
from
the linked table --- Please say there is a way!!!! Thanks

Michel Walsh said:
Hi,


A GROUP BY query is not updateable.

Once you have a query, you can use it "as if" it was another table (in
the
query designer, as example) as long as joining them is concerned.

I am not sure about what "communication" between a query and table can
be,
exactly, so, I assumed it was a kind of lookup ( join); if it is about
update the table from the query, as said in the first paragraph, you are
out
of luck.


Hoping it may help,
Vanderghast, Access MVP


esparzaone said:
I have a link that a table is based off of. I have a simple query that
reads
all the information. Now I want to connect the simple query to a table
so
they are communicating. SELECT tblData.TicketNum, [RSM-Recv
Query].Bins,
[RSM-Recv Query].CullP, [RSM-Recv Query].BrineP, [RSM-Recv Query].P080,
[RSM-Recv Query].P085, [RSM-Recv Query].P090, [RSM-Recv Query].P095,
[RSM-Recv Query].P100, [RSM-Recv Query].P105, [RSM-Recv Query].P110,
[RSM-Recv Query].P115, [RSM-Recv Query].P120, [RSM-Recv Query].P130
FROM tblData RIGHT JOIN [RSM-Recv Query] ON tblData.TICKETNUM =
[RSM-Recv
Query].TicketNum
GROUP BY tblData.TicketNum, [RSM-Recv Query].Bins, [RSM-Recv
Query].CullP,
[RSM-Recv Query].BrineP, [RSM-Recv Query].P080, [RSM-Recv Query].P085,
[RSM-Recv Query].P090, [RSM-Recv Query].P095, [RSM-Recv Query].P100,
[RSM-Recv Query].P105, [RSM-Recv Query].P110, [RSM-Recv Query].P115,
[RSM-Recv Query].P120, [RSM-Recv Query].P130;
Could someone please look over it and let me know what is wrong?
Thanks
Zenia
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top