I'm developing a graph that uses 2 form textboxes, txtstart and txtend, to specify a date range for the graph. The graph shows data grouped pre month and I can get the graph to work fine, but it skips past any months where there is no data stored in the tables for that particular month.

I was thinking of using a union with the first query to fill out the months that have no data with entries of 0. I've somplified the sql so you can get the idea....

select (month(date)+year(date)) as months, yaxisdata, data
from mytable
where <some conditions>
select (month(date)+year(date)) as Months, '0', '0'
From somewhere
where <something>

OK. heres the tricky bit. My table 'somewhere' needs to be populated with a date for every month between the date range between txtstart and txtend. The day of the month is irrelevant. it can be any day.

Any ideas on how you could populate a table in this way???

Big thanks on any help available