First make your "On Error" a comment line so it will highlight the line where error arise.
Code:
'On Error Resume Next
.....
'On Error GoTo 0
then tell us what line is highlighted so that it is easier to help you.
Mostly, I encounter this error when giving value to a control from my record on database. When the result is zero or does not match to any record.
e.g.
Code:
Text1.text = rst!StudentID
if rst!StudentID is null then that error message will pop-up
Good Luck