I have this lovely query. There is a section with a nested if. I have a total of two ifs and two end ifs. For some reason, the compiler is saying i have an End if without an If block. I think it lies.
Dim bd As Database
Dim rs As Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("Report_log2", dbOpenDynaset)
With rs
Do While Not .EOF
If rs!acct_reference_id = Reports![report]!ID And rs!approval_status = "Pending" And rs!ModDate > Date - 30 Then
Response = MsgBox("You have already processed this report as Pending within the last 30 days. Do you want to override that entry?", vbOKCancel, "Override?")
If Response = 1 Then GoTo run_report
Else
GoTo Cancel
End If
End If
.MoveNext
Loop
End With
Of course, I must be going something wrong, but for the life of me i cannot figure out what. Perhaps it's the Gotos?
Any advice will be greatly appreciated.
Chris
Bookmarks