View Full Version : Sub Query Unsure and google failed me


stuey
05-09-2007, 01:05 PM
i have been running a query

So

[Select * from tblStudents]

Now this is part of an ASP system which logs when the students log in

[SELECT * FROM tblStudenttracker ]

now I dont update the student record regarding when they log, I track when the logins occur so I have a login history.

But I have now been asked to track the last logged in date

so I figure

[SELECT fldStudentID, fname, lName, [SELECT TOP 1 [tblStudentTracker]![fldDateStamp] FROM tblStudenttracker where [tblStudentTracker]![fldStudentID] = [tblStudents]![fldStudentID] ] FROM tblStudents]

apparently access says this is incorrect :(
and complains about the FROM in the SUB query