Good day,
I need some help with MS Access and a query. My SQL query takes entries from the a table and copies it to the same table with the month field changed to a different value. For example it would take all the payroll entries for Jan, copy them and change the month to Feb.
The SQL looks like this:
INSERT INTO example_table (month, field, field, field)
SELECT "FEB", field, field, field
FROM example_table
WHERE month = "JAN"
It selects all the entries for JAN and then copies and pastes it into the same table and changes the month to FEB.
My question is, how can I run this query in MS Access to get the “FEB and “JAN” field values (from the above example) from a form?
Maybe the way that I’m trying to do this is not the best method, if there is another way to get the same results please let me know.
I’m not sure exactly what you’re after, but if
YourFormhas a text box namedtxtFirstMonthwhere you would type in “JAN” and another namedtxtSecondMonthwhere you would type in “FEB”, this should give you the equivalent of your sample query.