I'm wondering if someone could tell me the syntax for running multiple, sequential append queries using SQL in VBA. I have the syntax down for appending a single query using a command button:
Private Sub Command_Click
Dim strSQL as String
strSQL=SQL Statement (Insert into, Select, From, Where)
DoCmd.RunSQL strSQL
End Sub
But I need to do this a bunch of times in a row changing the criteria slightly each time. I tried revising the SQL as needed and then copying it below the first statement and putting the DoCmd statement after the second statement. But when I ran the code after that, only the first part of the query worked. I assume there has to be some way to string together repetitive SQL statements. Any advice would be greatly appreciated!
Leslie