I have the following function in a module:-
I am building an INSERT sql string and need the "TempPolicyNo" parameter to be part of the string but keep getting syntax errors or no result, my sql looks like this:-
What is the correct syntax for the WHERE clause to reference TempPolicyNo?
Any help appreciated.
If IT ain’t working Binnit and Reboot
Code:
Public Function AddRiskDetailsToHistory(TempPolicyNo As String)
Code:
Dim strSQL As String
strSQL = "INSERT INTO tblRiskDetailsHistory
etc etc
" FROM tblRiskDetails" & _
" WHERE (((tblRiskDetails.EXPPolicyNo)= TempPolicyNo));"
DoCmd.RunSQL (strSQL)
Code:
" WHERE (((tblRiskDetails.EXPPolicyNo)= TempPolicyNo));"
If IT ain’t working Binnit and Reboot