W
Winger
This is a common problem I seem to be having...incorrect use of quotes and
double quotes. From looking at prevoius threads I still can't solve my
current problem.
I want to insert a single record, and the code again works fine with
absolute values, but won't put the variable value in.
DoCmd.Run SQL "INSERT INTO tblResults (FundName, Matches,Score) Values (
Funder,Matches,Score)"
I've tried variations such as .........Values (
&Chr$(34)Funder&Chr$(34)....etc
and also ....Values('[Funder]',.... but then I get "expected end of
statement" error.
If any one can provide the corect syntax for the above problem, and maybe a
brief explanation as to how quotes, double quotes, and use of Chr$(34) should
be used to differentiate betwenn absolute values and variables etc, I sure
that would help many people.
Many thanks
Winger
double quotes. From looking at prevoius threads I still can't solve my
current problem.
I want to insert a single record, and the code again works fine with
absolute values, but won't put the variable value in.
DoCmd.Run SQL "INSERT INTO tblResults (FundName, Matches,Score) Values (
Funder,Matches,Score)"
I've tried variations such as .........Values (
&Chr$(34)Funder&Chr$(34)....etc
and also ....Values('[Funder]',.... but then I get "expected end of
statement" error.
If any one can provide the corect syntax for the above problem, and maybe a
brief explanation as to how quotes, double quotes, and use of Chr$(34) should
be used to differentiate betwenn absolute values and variables etc, I sure
that would help many people.
Many thanks
Winger