seannypoos
New member
- Local time
- Today, 06:54
- Joined
- Feb 23, 2009
- Messages
- 8
Hi hope you can help -
I have a lesson booking database and am using a report to create an invoice.
The report backs onto a query where you can specify a range of dates (parameter queries) which lists matching lessons in that date range.
Each lesson booking has a lessontype (there are several) with different rates.
In the report footer I have a text box which simply adds the rate field for each matching record ie =Sum([rate]). I can get away with the report footer calc as the query chooses a single customer and there are never that many lessons.
Easy enough BUT there's a snag ....
One lesson type (no.4) is associated with a "block booking" this is worth £140 for an advance booking of 10 lessons. The booking form therefore will appear 10 times alongside other more normal lessons. The problem therefore the invoice gets inflated up to £1400 + (10 x £140) which is wrong,
I've tried creating two text box fields, one which says IIF(lessontype = 4,140,0) and then a similar one which is the inverse IIF(lessontype <> 4, rate, 0) and then adding these two together. The first subtotal works - it only counts a block booking lesson once but the other one always evaluates to zero so unless the query results are blockbooking only the total is obviously incorrect all the time. Any ideas?
Many thanks in advance for any help!
I have a lesson booking database and am using a report to create an invoice.
The report backs onto a query where you can specify a range of dates (parameter queries) which lists matching lessons in that date range.
Each lesson booking has a lessontype (there are several) with different rates.
In the report footer I have a text box which simply adds the rate field for each matching record ie =Sum([rate]). I can get away with the report footer calc as the query chooses a single customer and there are never that many lessons.
Easy enough BUT there's a snag ....
One lesson type (no.4) is associated with a "block booking" this is worth £140 for an advance booking of 10 lessons. The booking form therefore will appear 10 times alongside other more normal lessons. The problem therefore the invoice gets inflated up to £1400 + (10 x £140) which is wrong,
I've tried creating two text box fields, one which says IIF(lessontype = 4,140,0) and then a similar one which is the inverse IIF(lessontype <> 4, rate, 0) and then adding these two together. The first subtotal works - it only counts a block booking lesson once but the other one always evaluates to zero so unless the query results are blockbooking only the total is obviously incorrect all the time. Any ideas?
Many thanks in advance for any help!