nested queries

J

Joseph Atie

I currently have 3 queries that id like to combine into a single nested query
to run from vba.

in access i created a 2 queries that join 2 tables,

qry1:
"SELECT Transdata.Transcode, Transdata.Barcode, Equipment!Name & "" "" &
Equipment!Type AS Description FROM Equipment LEFT JOIN Transdata ON
Equipment.Barcode = Transdata.Barcode where Transdata.Barcode = " & bcode &
";"

qry2:
"SELECT Users![First Name] & "" "" & Users!Surname AS Name FROM Users LEFT
JOIN Transactions ON Users.Usercode = Transactions.Usercode where
transaction.usercode = " & ucode & ";"


i then created a 3rd query that joins the first to queries.

qry3
SELECT Query2.Name, Query3.Description
FROM Query2 INNER JOIN Query3 ON Query2.Transcode = Query3.Transcode;


I know i can use the first 2 queries to produce the answer im looking for.
but id like for my own learning to understand how to put these together into
the third query.

help please
 

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

Similar Threads

Nested or Sub query? 2
Query changes on its own 2
Help with code 3
SubQueries in Column 1
Using UNION with three queries 1
run a series of queries 1
queries based on queries 6
Nested Queries with a Parameter 5

Top