Skip to content
Advertisement

VBA 3131 error in SQL using variables in query

Can you please help me? I was trying to figure it out for about 2 hours but I still have some error in the syntax.

I have the following code with String variables which I need to pass into the SQL query in VBA script, but I am keep getting some syntax errors.

Thank you very much for some advice.

Advertisement

Answer

I think you were going for this:

Where I assume TableName, tableFieldName and tableRecord are variables??

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement