SELECT studentdetails.[mobileno] FROM studentdetails where dobirth=(SELECT studentdetails.[dobirth]
FROM studentdetails where month(dobirth)=month(date()) and Day(dobirth)=Day(Date()));
the error is: atmost one record can be returned by a subquery.. when am running in access 2007
How to get multiple records byusing subqueries in access database 2007
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Hirendra SisodiyaRank #258 · 9.8K reputationPosted Mar 19, 2010, 3:11 AM EDT
your subquery (SELECT studentdetails.[dobirth]
FROM studentdetails where month(dobirth)=month(date()) and Day(dobirth)=Day(Date()) return more than one records, so you can not use = operator in where condition you can use 'in' operator like this:
SELECT studentdetails.[mobileno] FROM studentdetails where dobirth in (SELECT studentdetails.[dobirth]
FROM studentdetails where month(dobirth)=month(date()) and Day(dobirth)=Day(Date()));
thanks
Please mark as Accepted Answere if you like this answere