Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 2nd, 2011, 05:42 PM
Registered User
 
Join Date: Aug 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to webmeister
Question No Current Record Query Error

I am having an issue when I have more than one record being returned. I get a "No current record" error message.

However if I only have one record being returned it works without any issue.

My query's SQL is below.
Any idea as to what is causing this issue?

Code:
SELECT tblRegistration.regRecordID, tblRegistration.stuID, tblTestSession.tsSession, tblRegistration.regApptChange, tblRegistration.regNoShow, tblRegistration.regAutoAppointment, tblRegistration.regTaken, tblRegistration.regDateofReg

FROM tblTestSession INNER JOIN tblRegistration ON tblTestSession.tsID = tblRegistration.tsTestSession

WHERE tblRegistration.regRecordID = (SELECT tblRegistration.regRecordID 
FROM tblRegistration LEFT JOIN subqryRegistrationWithResults ON tblRegistration.regRecordID = subqryRegistrationWithResults.regRecordID
WHERE (((subqryRegistrationWithResults.regRecordID) Is Null)))
 
Old February 2nd, 2011, 06:18 PM
Friend of Wrox
 
Join Date: Sep 2010
Posts: 245
Thanks: 5
Thanked 24 Times in 23 Posts
Default

Is the issue when the subquery returns more than one record?
__________________
Boyd Trimmell aka HiTechCoach (.com)
Microsoft Access MVP Alumni 2010-2015
 
Old February 3rd, 2011, 01:42 PM
Registered User
 
Join Date: Aug 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to webmeister
Default

Yes. it is.
 
Old February 3rd, 2011, 01:49 PM
Registered User
 
Join Date: Aug 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to webmeister
Default

When I use
Code:
 
WHERE tblRegistration.regRecordID IN (SELECT tblRegistration.regRecordID ....
works but when I put it into my union query it locksup and feezes Access.
 
Old February 3rd, 2011, 03:43 PM
Friend of Wrox
 
Join Date: Sep 2010
Posts: 245
Thanks: 5
Thanked 24 Times in 23 Posts
Default

Are you changing the putting the sub query to a union query that is returning multiple records?
__________________
Boyd Trimmell aka HiTechCoach (.com)
Microsoft Access MVP Alumni 2010-2015





Similar Threads
Thread Thread Starter Forum Replies Last Post
Error: Either BOF or EOF is True, or the current record has been deleted. Hannibal Classic ASP Basics 1 April 6th, 2010 01:18 PM
"no current record" error in DAO code Loralee Access 6 October 13th, 2005 12:50 PM
runtime error 3021-no current record togs74 Access 1 July 30th, 2005 02:10 AM
Error 3021 - No Current Record JackNimble BOOK: Expert One-on-One Access Application Development 5 October 2nd, 2004 03:26 PM
Print current record vladimir Access 2 September 10th, 2003 11:53 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.