Quote Originally Posted by OBP View Post
It appears that Howard is not active on the forum as those 2 seem to be his only posts.
Due to health issues I cannot provide my normal assistance.
However I can offer some ideas for you to explore.
One point that was missed is that when you select Design View it triggers the Form's "on Unload" event, which might be possible for you to run a Module from.
The another point is that although the me.currentview may not work there are a whole host of things available in the Forms Collection.
See
https://docs.microsoft.com/en-us/pre...ectedfrom=MSDN
So using me. may not work within the form but using the formal forms name may provide data to another form running in the background in invisible mode.

You are still calling the public procedure from outside of the containing form. ?
And switching to design view should fire the close and unload events. I haven't tested it but I would expect that to cancel any loop (of course a loop will lock the form unless you've used doevents and that would be a design rather than a user issue).

I'm not seeing a real world problem here. I'd be interested if you do have an example.

Thank you, I will explore this today! I appreciate your quick responses. I will definitely explore the Forms collection link you posted. I will play with the replacement of Me.

When this loop runs, it displays ever-increasing numbers in the Immediate window, each number followed by the value of CurrentView. In addition, there needs to be a non-form module with this code:
Sub LoopTest()
Form_Form1.BigLoop
End Sub
No, actually I wasn't calling from outside of the containing form yet. Was first attempting to understand the workings of the code, not sure I understand how to call the form when I tried it the first time. I then attempted to see if I could get any type of result in the Navigation form I am inspecting, and I did, which is very optimistic:

Below code is in Maintenance Form that I'm not sure about which opens before the Navigation Form (Loop Code) that I am testing to see if is switched to Design View.
Sub LoopTest()
Form_NavigationF.BigLoop or Form!NavigationF.BigLoop
End Sub

I will try it properly was trying to get an understanding first but probably sabotaged myself doing so...
And also, I don't need a repetitive loop per se just a one time notification of the event.

If I get this working I will then write a procedure to send me an email in real-time when this occurs