Stephen Byrom
asked on
Make Table with year
Hi,
I have a Maketable query which I would run each year,
SELECT tblShiptProd.* INTO tblShipt2011
FROM tblShiptProd
WHERE (((Year([ShipDate]))=Year( Date())-1) );
I could run this in a procedure on a form, if I knew how to update the year part of the table name.
I'm sure there is a way of making a table with this query and naming the table at runtime with the previous year. i.e. If I run the procedure in January 2013 the table it would make would be called tblShipt2012.
As usual any advice is much appreciated.
I have a Maketable query which I would run each year,
SELECT tblShiptProd.* INTO tblShipt2011
FROM tblShiptProd
WHERE (((Year([ShipDate]))=Year(
I could run this in a procedure on a form, if I knew how to update the year part of the table name.
I'm sure there is a way of making a table with this query and naming the table at runtime with the previous year. i.e. If I run the procedure in January 2013 the table it would make would be called tblShipt2012.
As usual any advice is much appreciated.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks