English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I'm trying to set up a data base to track my bills. I want to set bills up for a repeating schedules that can be viewed at least a good 6 months out if not infinitely.

I figure I could do this by writing a formula in Excel copying it out as far as like and importing that to Access but that would be time consuming and would have to be done periodically for each due date and pattern.

I want a formula or VBA function or procedure that will make a self updating formula with this pattern.

2006-08-14 13:27:03 · 1 answers · asked by Dane_62 5 in Computers & Internet Programming & Design

1 answers

I'm not going to be able to write this for you at the moment but I can give you some direction. I assume that you're going to have some sort of input screen for your bills. For payments you can specify the start and end dates. In your code you can have a loop that uses the dateadd function. The code would look something like this (this is pseudo-code):

dim dEnddate as date
dim dPayDate as date

'get your dates from your form
dPaydate = txtStartdate.text
dEnddate = txtEnddate.text

Do while dPayDate <= dEnddate

dPayDate = dateadd("month",dPayDate, 1) 'increment paydate by 1 month
Loop

You'll drop out of the loop after paydate goes past your enddate

You can also have an option to specify the # of payments.
the loop would be similar.

2006-08-14 15:47:32 · answer #1 · answered by Anonymous · 2 0

fedest.com, questions and answers