S
Sean Mc
Follows is my code:
Dim rst As New ADODB.Recordset
Dim con As New ADODB.Connection
Set con = CurrentProject.Connection
'This should get a list of records having the same file
extension
strSQl = "SELECT TOP 1 tblPrts.Path " & _
"FROM tblPrts " & _
"GROUP BY tblPrts.Path " & _
"HAVING (tblPrts.Path Like '*" & strExt & "');"
rst.Open strSQl, con, adOpenForwardOnly, adLockReadOnly, -1
If Not rst.EOF Then vntRecs = rst.GetRows
If I paste the SQL str produced by this code into a query it returns a
record, yet this code returns no records.
I've been staring at this and can't figure my problem out. Is my brain still
asleep here and Im missing something obvious?
Thanks,
Sean Mc
Dim rst As New ADODB.Recordset
Dim con As New ADODB.Connection
Set con = CurrentProject.Connection
'This should get a list of records having the same file
extension
strSQl = "SELECT TOP 1 tblPrts.Path " & _
"FROM tblPrts " & _
"GROUP BY tblPrts.Path " & _
"HAVING (tblPrts.Path Like '*" & strExt & "');"
rst.Open strSQl, con, adOpenForwardOnly, adLockReadOnly, -1
If Not rst.EOF Then vntRecs = rst.GetRows
If I paste the SQL str produced by this code into a query it returns a
record, yet this code returns no records.
I've been staring at this and can't figure my problem out. Is my brain still
asleep here and Im missing something obvious?
Thanks,
Sean Mc