The facts:
I use Access 2013, but it must be run in Access 2007 aswell.
I have the following 3 tables:
Order:
Id
Yes. Create a query like this:
SELECT DISTINCT
[Tens]+[Ones] AS Factor,
10*Abs([Deca].[id] Mod 10) AS Tens,
Abs([Uno].[id] Mod 10) AS Ones
FROM
msysobjects AS Uno,
msysobjects AS Deca;
Save it as qdyFactor. Then create this query:
SELECT DISTINCT
DateAdd("d",[Factor],[DateFrom]) AS Dates
FROM
qdyFactor
WHERE
qdyFactor.Factor Between 0 And DateDiff("d",[DateFrom],[DateTo]);
This will create the list of dates. Finally, use this to filter and sum from your other tables.