I have a Check Register I am working on and of course the need arises to schedule future transactions. Here is my dilemma: I
want the user to be able to enter the data if date is today, easy! If not then I need a way to store data until it is time to
enter this into the Check Register then append to the register.
This is as far as I have got! Am I approaching this right? 2 Screenshots attached to help you understand. Store data into
temp table until then ???
Date Criteria for schedulleddte is;
In other words, if user selects a Register Transaction to be entered into the Check register and if fields,
frequency,scheduleddte, frequencyamount and freqpayee are NOT Null then transaction can be saved. If Date is today!
If scheduleddte is date() then save record Else use scheduleddte as criteria to save record for future date.
I created a new table to store data in until date criteria is met, it is named Tsavedtrans
It has the same filed names as the above.
Here is my code such as it is when I got stumped as how to proceed!
Private Sub Form_Current()
If IsNull([Bank]) Then 'Bank Account is required
MsgBox "A Bank Account For Register Must be Selected"
If Not IsNull(frequency) Or Not IsNull(scheduleddte) Or Not IsNull(frequencyamount) Or Not IsNull(freqpayee) Then
If MsgBox("prompt", vbYesNo, "Schedule a Future Transaction?") = vbYes Then
If (scheduleddte) = Date Then
If (scheduleddte) > Date Then
FYI I created a new table to store data in until date criteria is met, it is named Tsavedtrans
It has the same field names as the tables being used for the check register.
I also created a append query named Qappendfuturetrans that appends the data from the QRegB query where TReg
table and TFrequency tables are used and that is what the form CheckRegister is based on, the query QRegB.
NOW this is as far as I have got.
Last edited by burrina; 12-25-2012 at 10:19 PM.
Reason: More Explanation
Reply With Quote
12-26-2012, 12:08 AM
Windows 7 64bit Access 2010 64bit
Join Date Oct 2012
Ok, here is my latest attempt at entering a New Record every day when the user has selected "Daily" as the
([scheduleddte]) is a date field.
Private Sub cmdCopyRecord_Click()
If Me.NewRecord = True Then 'Checks For New Record
If Not IsNull ([scheduleddte]) Then 'Checks For a Scheduled Date
If ([scheduleddte]) < Date Then 'Date must be a New Date To Continue
Dim v1 As Variant 'Variable 1
Dim v2 As Variant '""
Dim v3 As Variant '""
Dim v4 As Variant '""
v1 = Me!frequency.Value 'Sets Variable Values
v2 = Me!freqpayee.Value
v3 = Me!frequencyamount.Value
v4 = Me!scheduleddte.Value
RunCommand acCmdRecordsGoToNew 'Saves New Record
Me!frequency = v1 'Copies New Variables To New Record
Me!freqpayee = v2
Me!frequencyamount = v3
Me!scheduleddte = v4