Hi
I have a data table which will hold several weeks worth of data , fields marked as week 1, week 2 up to and including week 9
I need to add up the data in these fields, but the number of weeks that I need to add up will need to be variable based on an entry that a user keys into a form.
So, user enters in 2, I need the database to total up the data for week 1 and week 2 ,
I know I could write 9 separate queries which would run based on the selection, but I would like to know if there is some clever coding way round this.
Any suggestions?
Cheers
I have a data table which will hold several weeks worth of data , fields marked as week 1, week 2 up to and including week 9
I need to add up the data in these fields, but the number of weeks that I need to add up will need to be variable based on an entry that a user keys into a form.
So, user enters in 2, I need the database to total up the data for week 1 and week 2 ,
I know I could write 9 separate queries which would run based on the selection, but I would like to know if there is some clever coding way round this.
Any suggestions?
Cheers