abhisheknag89
Registered User.
- Local time
- Today, 03:16
- Joined
- Jul 1, 2010
- Messages
- 18
Hey all
I've trying for weeks to be able to run SQL statements in my vba program but nothing has worked so far. I've come across all kinds of syntaxes, tried modeling my statements after access' generated SQL for queries, used record sets- nothing has yielded results. I always get a syntax error.
If I can run even one basic SQL line, I'll be able to take it from there. Can you help?
Here's what I Have:
Table Name: Dummy Table
Filed Name: line rating
CODE:
Docmd.RunSQL (UPDATE [dummy table] SET [dummy table].[line rating]=100)
I get the following ERROR:
"Compile Error: Expected list separator or )"
If I try the following CODE:
'DoCmd.RunSQL ("UPDATE Dummy Table " _& " SET Line Rating = 100 ")
I get an ERROR:
"UPDATE Syntax Error"
I've tried other syntaxes that i've found online too including using recordsets but haven't met any success.
I'm using Access 2007.
Help!
I've trying for weeks to be able to run SQL statements in my vba program but nothing has worked so far. I've come across all kinds of syntaxes, tried modeling my statements after access' generated SQL for queries, used record sets- nothing has yielded results. I always get a syntax error.
If I can run even one basic SQL line, I'll be able to take it from there. Can you help?
Here's what I Have:
Table Name: Dummy Table
Filed Name: line rating
CODE:
Docmd.RunSQL (UPDATE [dummy table] SET [dummy table].[line rating]=100)
I get the following ERROR:
"Compile Error: Expected list separator or )"
If I try the following CODE:
'DoCmd.RunSQL ("UPDATE Dummy Table " _& " SET Line Rating = 100 ")
I get an ERROR:
"UPDATE Syntax Error"
I've tried other syntaxes that i've found online too including using recordsets but haven't met any success.
I'm using Access 2007.
Help!