a combination query

ariansman

Registered User.
Local time
Today, 13:51
Joined
Apr 3, 2012
Messages
157
Query1 has one result like the following
Code:
ID   studentname    lectureplace       lecturesubject
23        jack           A             Geography
Query2 has results like the fowloing:
Code:
ID   studentname    lectureplace       lecturesubject
12        jack           A             Biology    
18        jack           c             politics    
20        jack           B             math    
22        jack           A             math    
27        jack           B             math
29        jack           A             politics
A table or query is required which has the record from query1 and those records from query2 whit ID greater than the ID of the record in query1. The following is what the result is like
Code:
ID   studentname    lectureplace       lecturesubject
23        jack           A             Geography    
27        jack           B             math
29        jack           A             politics
Thank you
 
I would create a query based on Query 2, then underneath the ID field, in the criteria section I would use a DLookup into Query 1 to retreive the ID.
 
I would create a query based on Query 2, then underneath the ID field, in the criteria section I would use a DLookup into Query 1 to retreive the ID.

thank you,
and would that also add the query1 data? plus, how can i make a dlookup? i am not good at writing such things.
thank you
 
If there's really only one value in query 1... or if you always want the biggest ID value in query1

I think you could just write a subquery in your New Query...

For Example:
> (Select Max(ID) From Query1)
 
I thought a subquery might be faster...no?
 

Users who are viewing this thread

Back
Top Bottom