Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Return All Records If...

Status
Not open for further replies.

skoutr1

Technical User
Aug 9, 2001
22
0
0
US
I have a MS Access database with a table that includes the following fields: [numID] and [numYear].

In a query, I want to return ALL records for [numID] if at least one record for [numID] has [numYear] = Year(Now()).

-Rod
 
How about something like:

[tt]Select * From tblTable
Where NumID In
(Select NumID From tblTable A
Where A.NumYear = Year(Date())[/tt]
 
I had people here at work giving me the same code. After much frustration and trial and error, I got it to work.

Thanks!
-Rod
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top