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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
'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 | |
|
|
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 |