G
Guest
Based on a form's textbox, forms!theform!thetextbox, which is a short date
and is always the the 1st day of a selected month/year (i.e., it can be
7/1/2006, 10/1/2003, 2/1/1999...you get the idea), I want to fill out a table
field, thetable.thefield (the only field in the table), with 12 records
pertaining the the selected month and the previous 11 months. For example,
if forms!theform!thetextbox = 1/1/2007, I want the table to contain the
following 12 records.
2/1/2006
3/1/2006
4/1/2006
5/1/2006
6/1/2006
7/1/2006
8/1/2006
9/1/2006
10/1/2006
11/1/2006
12/1/2006
1/1/2007
I can do this in VBA using a loop and the openrecordset command, but I would
rather do it in SQL if possible. Thanks for any help.
and is always the the 1st day of a selected month/year (i.e., it can be
7/1/2006, 10/1/2003, 2/1/1999...you get the idea), I want to fill out a table
field, thetable.thefield (the only field in the table), with 12 records
pertaining the the selected month and the previous 11 months. For example,
if forms!theform!thetextbox = 1/1/2007, I want the table to contain the
following 12 records.
2/1/2006
3/1/2006
4/1/2006
5/1/2006
6/1/2006
7/1/2006
8/1/2006
9/1/2006
10/1/2006
11/1/2006
12/1/2006
1/1/2007
I can do this in VBA using a loop and the openrecordset command, but I would
rather do it in SQL if possible. Thanks for any help.