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  

Correlated Subquery doesn't work



 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old March 7th, 2006, 05:28 PM posted to microsoft.public.access.queries
external usenet poster
 
Posts: n/a
Default Correlated Subquery doesn't work

Whenever I try and run this query a pop-up box comes up asking for the value
of tblWorkLog_Main.GuageID.

Why is this happening. According to the following 2 articles my query
should work. I've never had this problem in SQL Server.
http://www.tek-tips.com/faqs.cfm?fid=4058
http://support.microsoft.com/?kbid=209066

Both queries work fine independantly (as long as I remove the reference to
tblWorkLog_Main in the sub query if I run it by itself).

I'm using MS Access 2000.


SELECT WorkLogID, GaugeID, NextCertDue,

(SELECT TOP 1 NextCertDue
FROM tblWorkLog wl
WHERE GaugeID =tblWorkLog_Main.GuageID
AND
WorkLogID 1
ORDER BY NextCertDue Desc) AS DueDate


FROM tblWorkLog tblWorkLog_Main
ORDER BY GaugeID, NextCertDue DESC;





 




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
Please Help?? Auto Update Field in table A. Smart General Discussion 8 February 2nd, 2006 01:19 PM
Tricky query grouping JLamb Running & Setting Up Queries 4 November 2nd, 2005 09:38 PM
how do I create a work order form cher952 Using Forms 1 March 14th, 2005 05:09 PM
Work Areas in a database LMB New Users 3 October 4th, 2004 11:31 PM
"Work Offline" Menu and "Exit" Menu MSHUME General Discussion 1 September 27th, 2004 09:17 PM


All times are GMT +1. The time now is 12:22 AM.


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