S
setterst
Hopefully all of you can once again help me with a problem I am having
running multiple INSERT queries in my VBA code. My code looks
something like this:
' Form condition 1
If condition1 = True Then
CurrentDb.Execute "INSERT INTO tblTable " & _
"(Field_1, Field_2, Field_3)" & _
"VALUES (Val_1, Val_2, Val_3)"
End If
' Form condition 2
If condition2 = True Then
CurrentDb.Execute "INSERT INTO tblTable " & _
"(Field_1, Field_2, Field_3)" & _
"VALUES (Val_1, Val_2, Val_3)"
End If
And the code continues like this for multiple form conditions.
So here is the problem. All of my queries will function properly when
they are executed individually, but when multiple form conditions are
true, only the first query will append its values to the destination
table. I verified with the debugger that I have my conditions
correctly configured and it is executing the commands. Am I missing
something here?
Your help is always appreciated.
-Sean
running multiple INSERT queries in my VBA code. My code looks
something like this:
' Form condition 1
If condition1 = True Then
CurrentDb.Execute "INSERT INTO tblTable " & _
"(Field_1, Field_2, Field_3)" & _
"VALUES (Val_1, Val_2, Val_3)"
End If
' Form condition 2
If condition2 = True Then
CurrentDb.Execute "INSERT INTO tblTable " & _
"(Field_1, Field_2, Field_3)" & _
"VALUES (Val_1, Val_2, Val_3)"
End If
And the code continues like this for multiple form conditions.
So here is the problem. All of my queries will function properly when
they are executed individually, but when multiple form conditions are
true, only the first query will append its values to the destination
table. I verified with the debugger that I have my conditions
correctly configured and it is executing the commands. Am I missing
something here?
Your help is always appreciated.
-Sean