I have a search form, which itself is a multiple items form. I have a search field - unbound field - which is used to enter a part number to search the DB for, and the result set is returned to the same form in the multiple items area.
I have recently adjusted the forms to not display the new record row, so when the form initially opens it has absolutely no records to display. (Rightfully so.)
I have started receiving random "No current record" popup errors.
I suspect that some event is firing which I have no VBA code wired to, thus my custom error handler does not handle it and the default error message comes up.
I came across this post ( http://www.utteraccess.com/forum/Cu...1.html&pid=1942596&mode=threaded#entry1942596 ), which does successfully lead to my masking the error with the following code:
1) Is the default behavior for Access / VBA to consider firing certain events when certain things happens, and if no VBA code is wrired to the event then obviously it has no code to run for that event?
If so, then any guesses what event I should write code to so I do not have to wire this code to the Form_Error event?
2) Is there some sort of event watcher that I have not come across yet in Access / VBA that would give a port-hole view into what events are firing when even if they have no code wired to them? Sort of like a SysInternals ProcessMonitor for Access / VBA.
I have recently adjusted the forms to not display the new record row, so when the form initially opens it has absolutely no records to display. (Rightfully so.)
I have started receiving random "No current record" popup errors.
I suspect that some event is firing which I have no VBA code wired to, thus my custom error handler does not handle it and the default error message comes up.
I came across this post ( http://www.utteraccess.com/forum/Cu...1.html&pid=1942596&mode=threaded#entry1942596 ), which does successfully lead to my masking the error with the following code:
Code:
Private Sub Form_Error(DataErr As Integer, Response As Integer)
Select Case DataErr
Case 3021
'3021 is a "No current record" error
Response = acDataErrContinue
Case Else
Response = acDataErrDisplay
End Select
End Sub
If so, then any guesses what event I should write code to so I do not have to wire this code to the Form_Error event?
2) Is there some sort of event watcher that I have not come across yet in Access / VBA that would give a port-hole view into what events are firing when even if they have no code wired to them? Sort of like a SysInternals ProcessMonitor for Access / VBA.