Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select statement not working

Status
Not open for further replies.

corbinap

Programmer
Nov 20, 2006
34
US
I need to filter records form a table to a form and have this SQL statement ONLoad event. It isn't working. Can someone help. Thanks.


Set rs = Currentdb.OpenRecordset("SELECT tblCorp19_1.CRM_Nbr, tblCorp19_1.[19_2 Status], Max(tblCorp19_1.revision) AS MaxOfrevision FROM tblCorp19_1 " & _
"GROUP BY tblCorp19_1.CRM_Nbr, tblCorp19_1.[19_2 Status] " & _
"HAVING (((tblCorp19_1.CRM_Nbr) Is Not Null) AND ((tblCorp19_1.[19_2 Status]) Is Null));"
 
It isn't working
Any chance you could post some meaningful info, like error message, highlighted line of code when in debug mode, ...

what do you want to do with your recordset ? how is rs declared ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top