automatic update (1 Viewer)

CALV

Registered User.
Local time
Today, 04:11
Joined
Apr 25, 2001
Messages
74
Hi all

have a databse I made a bit ago (with plenty of help from folks on here!!), only now they want an update :(
The database basically logs jobs, when a job is booked, the date etc are put in a table, along with a job_status field, this status is initially set to "pending", once the job is complete, it changes to "complete", BUT now they want it so that if say the date the job is booked for is 1 Jan, and the date NOW is say 2nd Jan, and the job hasnt been completed, it changes status, easy to do once the form is opened, but how do i do this everythime the switchboard is opened?

TIA

CALV
 

Pat Hartman

Super Moderator
Staff member
Local time
, 23:11
Joined
Feb 19, 2002
Messages
43,603
You could put code in the open event of the switchboard form that runs an update query.

However, this really isn't necessary. You didn't specify what your business rules are regarding what you want to change the status to and how many times you need to change it. When a job is added to the db it assumes a status of pending. When a job is completed, I presume that someone calls up the record and changes the status or enters a date complete field and you automatically change the status. I don't see the point of changing the status from pending. If you have some time rules such as if a job isn't completed within 24 hours it is late, then you can report on this when the db opens by running a query that finds all pending jobs with entered dates prior to 24 hours old.
 

Users who are viewing this thread

Top Bottom