Use current date to change a value in records

home70

Registered User.
Local time
Yesterday, 19:55
Joined
Jul 10, 2006
Messages
72
I have a db that is a checkbook register. I use a field in each transaction record to tell whether the transaction is current or is a future transaction (if it is in the future then it doesn't yet affect my balance). For instance, if the item is not scheduled to be paid for two weeks (I schedule payments with online banking), I check the "future item" box, then that record for that item isn't included in the report that tells me my current balance. How can I automatically take away that check mark on records when the date in that record becomes todays date (or before today)? Because at that point it is no longer a "future" transaction but is current. I could do this manually but it seems like there should be a way to do it automatically.
 
Hello:
In the AfterUpdate event of your transaction date control, you could place the following code:
'
Private Sub txtField1_AfterUpdate()
chkFutureItem.Value = False

End Sub
'
Substitute your date control for txtField1. This will clear the check box chkFutureItem after a date is entered in the control and the return key pressed.
Regards
Mark
 
If you were to record the date of the transaction you wouldn't need to do anything manually
 
Look at the thread based on Twychopen22's question about an event scheduler, which touches on how to pre-schedule events that become due in the future. It isn't exactly what you asked for, but it bears reading because some of the topic is relevant.
 

Users who are viewing this thread

Back
Top Bottom