Hi everyone! This is my first time posting here, so here goes.
THE SITUATION:
I have a form that has a start date, end date, project number, and total volume. These values are pulled from another form. Then depending on the difference between the start and end dates, that number of text boxes have their visibility set to TRUE and are displayed on the form. The user then enters volumes for each of the months between the start date and end date.
THE QUESTION:
I know that I can insert these records into a table one at a time using a loop,
this would then prompt the user if they were sure they wanted to append 1 records yes/no, for every record. I would like to know if there was a way to just loop through the values and have one insert statement.
I have tried using UNION ALL it comes up with a syntax error, I have tried comma separating the groups of values it isn't supported by this version of SQL. I have looked all over the internet but haven't found a suitable solution. Any help or information would be greatly appreciated.
Here is what I have so far.
Thanks,
Blake
THE SITUATION:
I have a form that has a start date, end date, project number, and total volume. These values are pulled from another form. Then depending on the difference between the start and end dates, that number of text boxes have their visibility set to TRUE and are displayed on the form. The user then enters volumes for each of the months between the start date and end date.
THE QUESTION:
I know that I can insert these records into a table one at a time using a loop,
Code:
For i = 0 To DateDiff("m",[start], [end])
INSERT INTO [table] (Column0, column1, ...) VALUES (value0, value1 ...)
Next
I have tried using UNION ALL it comes up with a syntax error, I have tried comma separating the groups of values it isn't supported by this version of SQL. I have looked all over the internet but haven't found a suitable solution. Any help or information would be greatly appreciated.
Here is what I have so far.
Thanks,
Blake
Comment