Expense report--expense reocurrences

twychopen22

Registered User.
Local time
Today, 05:55
Joined
Jul 31, 2006
Messages
101
I have an expense report I am trying to create. Expenses are 1 of 4 things (monthly, quarterly, semiannually, or annually occuring). If I enter a record say today:
8-04-2006--Window cleaning--$400.00--yearly

Is there a way to get it to automatically re-occur on the same day next year. (I want it to automatically reapply itself next year, not today showing next year. does this make sense?)

I want it to show up as a new record tho
 
Last edited:
It makes sense but is infernally tricky.

If I had to do this, I would have my normal expense table. Then I would a totally separate expense table that listed all the required fields - plus one more - the frequency code.

Then I would write an append query that I would run via Macro or some other convenient mechanism. One part of the query would be to select for items from the recurring expense table for which the expense is due.

Now, as to how to manage that? I would have to write the query in multiple stages. On ever day that a query from the recurring expense list came due, I would write the expense to a temporary table. Then for every expense in the temporary table, I would update the recurring table to show when the expense was last posted. Then I would post the expenses in the "real" expense table. Then I would empty out the temporary table.

So how do you know when an expense is due? If you update the recurring table's date for the expense and treat it as "last date expense incurred" AND if you have the interval in the recurring table, you can do a DateAdd function between the interval and the last date incurred. If today's date is equal to or greater than that computed date, the expense is due.

To complete the program cycle, you could also simplify it by just making the recurring expense table have one extra YES/NO checkmark that says, "Incurred today?" You clear that field with an UPDATE query before you start this sequence. Then set the field for each record where the item in question is due. Then update the date of the marked item. Then update the "real" expense list. In which case you don't really need the temporary table. Six of one, half-a-dozen of the other.
 
Thanks for the Reply Doc, I am thouroughly confused now. I am not sure why, I sorta understand what you are saying but definately not all of it. I will keep working on it and meditate on what you have said while Ihope to somehow gain the knowledge you have that I obviuosly don't.
 
If you don't mind. Can you attach sample db for this step?:)
 

Users who are viewing this thread

Back
Top Bottom