Hello all!
With the code below, I have
I want = RsHPOD!LastAudit + 365, ONLY IF the month of result matched ONE OF MONTHS in another table which contains list of dates as date "fldMonth" and checkbox field "fldActive"=True. Essentially I want to set the value only if I have those months active.
IF NOT match then
I want it to loop and set the new date +1 month until it satisfies above condition.
To help with this I have
I'm trying to visualize this, but I can't poop out code. Can someone help?
With the code below, I have
RsHPOD!fldIQA = RsHPOD!LastAudit + 365
. What I want it to be is as follows:I want = RsHPOD!LastAudit + 365, ONLY IF the month of result matched ONE OF MONTHS in another table which contains list of dates as date "fldMonth" and checkbox field "fldActive"=True. Essentially I want to set the value only if I have those months active.
IF NOT match then
I want it to loop and set the new date +1 month until it satisfies above condition.
To help with this I have
Code:
Dim strMonth as String
Dim RsMonth as Database
strMonth = "SELECT tblMonth.ID, DatePart('mmmm',[fldmonth]) From tblMonth WHERE (((tblMonth.fldActive)=True))"
Set RsMonth = db.OpenRecordset(strMonth, dbOpenDynaset)
I'm trying to visualize this, but I can't poop out code. Can someone help?
Code:
Do While Not RsHPOD.EOF
RsHPOD.Edit
RsHPOD!fldIQA = RsHPOD!LastAudit + 365
RsHPOD.Update
RsHPOD.MoveNext
RsMonth.MoveNext
If RsMonth.EOF Then
RsMonth.MoveFirst
End If
Loop