Hi First post here so hope the topic is in the right place. I have inherited a DB and I am trying to automate alot of old stuff and convert the macros into better functioning VBA.
My problem is one of the tasks that is performed is relying on a table that simply has dates listed to drop into another table see below.
ntblMonths
Month,Year,PeriodStart,PeriodEnd
1 2007 01/01/2007 31/01/2007
2 2007 01/02/2007 28/02/2007
etc.....................................................
Rather than re write the whole thing i was wondering has anyone got an idea of how to call SQl to accept a start date and an end date variable and then wright all those records inbeween into the table?
My problem is one of the tasks that is performed is relying on a table that simply has dates listed to drop into another table see below.
ntblMonths
Month,Year,PeriodStart,PeriodEnd
1 2007 01/01/2007 31/01/2007
2 2007 01/02/2007 28/02/2007
etc.....................................................
Rather than re write the whole thing i was wondering has anyone got an idea of how to call SQl to accept a start date and an end date variable and then wright all those records inbeween into the table?