UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Error - No Current Record, Access 2016    
 
   
gjr
post Nov 13 2017, 07:26 PM
Post#1



Posts: 13
Joined: 10-July 17



I get the error 'No Current Record' whenever I run the below query. The sub query runs perfectly well on its own.

SELECT Table1.Server
FROM Table1
WHERE Table1.Server Not In (SELECT [Query2].[Host name]
FROM [Query2]);

Please help. Thanks.
Go to the top of the page
 
Doug Steele
post Nov 13 2017, 07:59 PM
Post#2


UtterAccess VIP
Posts: 21,916
Joined: 8-January 07
From: St. Catharines, ON (Canada)


The query itself shouldn't generate that error. How are you "running" the query? (i.e.: what are you doing with it?)

--------------------
Doug Steele, Microsoft Access MVP (2000-2018)
http://www.accessmvp.com/DJSteele/AccessIndex.html
Co-author: Access Solutions: Tips, Tricks, and Secrets from Microsoft Access MVPs, published by Wiley
Co-author: Effective SQL: 61 Specific Ways to Write Better SQL, published by Addison-Wesley Professional
Technical Editor: Access 2010 Bible, Access 2013 Bible, Access 2016 Bible, all published by Wiley
Technical Editor: SQL Queries for Mere Mortals: A Hands-On Guide to Data Manipulation in SQL, 4th Edition, published by Addison-Wesley Professional
Go to the top of the page
 
gjr
post Nov 14 2017, 12:25 PM
Post#3



Posts: 13
Joined: 10-July 17



I am running the query directly. It was working well for sometime and all of a sudden I'm getting this problem. I don't know why.
Go to the top of the page
 
Doug Steele
post Nov 14 2017, 12:29 PM
Post#4


UtterAccess VIP
Posts: 21,916
Joined: 8-January 07
From: St. Catharines, ON (Canada)


Very odd.

See whether this works any better:

CODE
SELECT Table1.Server
FROM Table1 LEFT JOIN Query2
ON Table1.Server = Query2.[Host name]
WHERE Query2.[Host name] IS NULL;

--------------------
Doug Steele, Microsoft Access MVP (2000-2018)
http://www.accessmvp.com/DJSteele/AccessIndex.html
Co-author: Access Solutions: Tips, Tricks, and Secrets from Microsoft Access MVPs, published by Wiley
Co-author: Effective SQL: 61 Specific Ways to Write Better SQL, published by Addison-Wesley Professional
Technical Editor: Access 2010 Bible, Access 2013 Bible, Access 2016 Bible, all published by Wiley
Technical Editor: SQL Queries for Mere Mortals: A Hands-On Guide to Data Manipulation in SQL, 4th Edition, published by Addison-Wesley Professional
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    22nd September 2018 - 11:27 PM