Hello Access Gurus,
I'm adding on to a database for employee permits I made a few years back, and could use some ideas.
tblPermit has fields such as PermitNo (PK), LName, FName, IssueDate. I added a checkbox field named Revoke.
I added a new table, tblRevoke, with the fields RevokeID (PK), PermitNo, RevDate and RevDays.
If someone's permit gets revoked, the user opens the Permit form to that employees record, which displays all the information from tblPermit, and clicks the "Revoked" checkbox. This opens another form to enter the date revoked, and the number of days revoked (Permit Number is autofilled from the Permit form).
I would like the Revoked checkbox in tblPermit to automatically be unchecked when the Revoked Date plus the number of Days Revoked is less than the current date, so we don't have to manually uncheck these records, yet still have tblRevoke as a record of past offenders. I'm concerned that a report of revoked permits will be run, and the report will include people who are not currently revoked, but were never unchecked when their time came up.
I was thinking of putting code in the On Open property of the main menu so the records are updated each time the database is opened, but I'm not sure how to properly write such code.
Thank you all for any suggestions.