Please the SQL query is saying a error thus Expected end of statement can I know is wrong with it?
strSQLDetails = "SELECT tFD.* " & _
"FROM [tblFeesDetails] AS tFD" & _
" INNER JOIN" & _
" (SELECT LAST([Insect_Date and Time]) AS [LastDT]" & _
" FROM [tblFeesDetails]" & _
" WHERE ([GroupID] = '%G'")) AS sQ" & _
" ON tFD.[Insect_Date and Time] = sQ.LastDT " & _
"WHERE (tFD.GroupID = '%G'")
strSQLDetails = Replace(strSQLD etails, "%G", mGroupID)
					strSQLDetails = "SELECT tFD.* " & _
"FROM [tblFeesDetails] AS tFD" & _
" INNER JOIN" & _
" (SELECT LAST([Insect_Date and Time]) AS [LastDT]" & _
" FROM [tblFeesDetails]" & _
" WHERE ([GroupID] = '%G'")) AS sQ" & _
" ON tFD.[Insect_Date and Time] = sQ.LastDT " & _
"WHERE (tFD.GroupID = '%G'")
strSQLDetails = Replace(strSQLD etails, "%G", mGroupID)
Comment