vb6 billing program to charge rent certain day even if program not running

By sengland ·
I have a program that will charge rent on the 1st and possible late fee on the 11th. my problem is it won't charge these fees unless the program is running. Does it need a internal calendar so it won't run by the system date, if so is there a tutorial i can read up on it? Or am i on the wrong path. thanks for any help

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
Thread display: Collapse - | Expand +

All Answers

Collapse -


by scott_heath In reply to vb6 billing program to ch ...

If the application isn't running, it can't do anything. Something has to be "running" to execute the code.

Or do you mean when you open the app you want ti to process everything that should have happened since it was last run?

Collapse -

didn't explain it right did I? sorry

by sengland In reply to vb6 billing program to ch ...

i want it to process everything since it was last ran.

i had it where it would run at startup and run in the background when it 'appeared' to close...but of course that didn't take care of it when the computer shuts down.

any help or point in the right direction would be appreciated..thanks

Collapse -


by scott_heath In reply to didn't explain it right d ...

I don't know how you store data, but when the app is closed you need to write the data somewhere, be it a table or file. Then when it starts it needs to compare the dates. if it is more than one day it needs to roll through each day and run whatever process you want to run. That's the high-level view, anyway.

Collapse -

vb6 program with access database

by sengland In reply to Well...

vb6 program with access database that has names, addresses etc. it needs to charge rent on the first and late fee on the 11, if needed. it works great unless the program is closed those days of course.
i'm not sure how to go about 'rolling through each day', i know what you mean,,,just not how to do it
anywhere i can go to read up on this problem?
thanks alot for your replys

Collapse -

Start here...

by scott_heath In reply to vb6 program with access d ...

If there is no daily processign that makes it easier. When I saw rent I figured there were daily late fees as well. Let's use last month and this month as an example. You need a new table, let's call it "PrcoessedDates", with columns\fields for "LastMonthRentProcessed" and "LastMonthLateFeeProcessed. let's say the app ran fine in November on the 1st and 11th because you had it open. At the end of the process that runs on those days the need to write the month,'November', for the two fields, or you could use the date and year, maybe '200711' or '112007', whatever you like. Let's say you don't run the program again unitl December 15th. When the app starts it needs to read these field and if the data calculation shows that it is a new month and that it is after the 1st, it run the process for Dec 1st. Then it checks to see if it is after the 11th, if true it runs the late fee process as well. At the end of each process it updates those fields, so you should be OK.

Back to Windows Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums