L
LeParis
I am trying to run a query based on a calendar date. When I run this code:
Dim dtDateOfYear As Date
dtDateOfYear = calschedule.Value
DoCmd.FindRecord (dtDateOfYear)
I have this error: Runtime error 2162
A macro set to one of the current field properties failed because of
an error in the FindRecord action argument
I tried also the RunSQL statement:
Dim SQL As String
SQL = "SELECT * FROM qryCrosstab" & _
"WHERE dateofyear = calschedule.value"
DoCmd.RunSQL SQL
The error is Syntax Error in FROM Clause
Anyone can help?
Thanks
Dim dtDateOfYear As Date
dtDateOfYear = calschedule.Value
DoCmd.FindRecord (dtDateOfYear)
I have this error: Runtime error 2162
A macro set to one of the current field properties failed because of
an error in the FindRecord action argument
I tried also the RunSQL statement:
Dim SQL As String
SQL = "SELECT * FROM qryCrosstab" & _
"WHERE dateofyear = calschedule.value"
DoCmd.RunSQL SQL
The error is Syntax Error in FROM Clause
Anyone can help?
Thanks