I have a table "tblfeesdetails" which is updated by a command button click from a form belonging to another table. In the above mentioned table (tblfeesdetails), I have the following fields; GroudpID, ...,BillDate. Now I want to select all the records or data updated just now or (to day) based on two criteria thus Groupid and BillDate. But I am prompted with "Syntax error in FROM clause. The line Set rstd = CurrentDb.OpenRecordset(strSQLDetails) is highlighted with yellow colour meaning that the error is comming from here.
Expand|Select|Wrap|Line Numbers
- strSQLDetails = "SELECT tFD.* " & _
- "FROM [tblFeesDetails] AS tFD" & _
- " INNER JOIN" & _
- " (SELECT Now([BillDate]) AS [NowDT]" & _
- " FROM [tblFeesDetails]" & _
- " WHERE ([GroupID] = '%G'"")AS sQ" & _
- " ON tFD.[BillDate] = sQ.NowDT " & _
- "WHERE (tFD.GroupID = '%G'"";"
- strSQLDetails = Replace(strSQLDetails, "%G", mgroupid)
- Set rstd = CurrentDb.OpenRecordset(strSQLDetails)