A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

'No Current Record' error in Group By query with outer joins - SOLUTION



 
 
Thread Tools Display Modes
  #1  
Old September 8th, 2005, 05:12 AM
Allen Browne
external usenet poster
 
Posts: n/a
Default 'No Current Record' error in Group By query with outer joins - SOLUTION

This problem has been posted several times without a solution. This post is
really so that anyone seaching at groups.google.com can find an answer.

JET can't handle Nulls in yes/no fields. If you create a query with outer
joins, the yes/no field can return nulls. If you then try to GROUP BY the
yes/no field, JET comes unstuck, and responds with a 'No Current Record'
error.

The solution is to use Nz() to substitute False for null, so the GROUP BY
clause contains:
Nz([MyYesNoField], False)

Note that there are many other causes of this same error message in other
contexts, e.g.:
- A bug in Access 2002 SP3, during the deletion events of the form.
(Workaround: trap and ignore the error.)

- Attempting to Move records in a recordset that has no records. (Solution:
test the RecordCount.)

- Referring to a record when BOF or EOF are true. (Solution: test BOF or
EOF.)

- Attempting to use the record after a Find without testing if the find
worked. (Solution: test NoMatch.)

- A corrupted index.

Hope that helps someone.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Toolbars, Drop-Down Menus Rick New Users 1 September 21st, 2005 11:17 AM
ambiguous outer joins renwick Running & Setting Up Queries 3 February 22nd, 2005 01:29 PM
Union Query Not Returning A Value Jeff G Running & Setting Up Queries 2 October 19th, 2004 05:47 PM
Help Needed for Groups Please Paul Black General Discussion 15 June 21st, 2004 02:54 AM
trying to query current record on form in order to email that reco JulieC Running & Setting Up Queries 0 June 9th, 2004 05:38 PM


All times are GMT +1. The time now is 09:18 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.