Link to home
Start Free TrialLog in
Avatar of Stephen Byrom
Stephen ByromFlag for Ireland

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.
ASKER CERTIFIED SOLUTION
Avatar of mbizup
mbizup
Flag of Kazakhstan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Stephen Byrom

ASKER

Perfect!
Thanks