- Local time
- Today, 06:27
- Joined
- Jul 9, 2003
- Messages
- 16,271
Navigation Pane Stopper:-
This code prevents the user from opening the form from the navigation pane.
This is necessary if you have developed a form which should only be open from another form. In other words, a form that passes information back to the form that opened it.
The terms I use for these type of forms are "Call Called" as in you have a form which is "Called" (the one you are opening) and you have the form that is opening it.... that's the "Call" form >>> Call Called.
Add the following code to the forms "On Open" Event:-
More Info HERE:- Navigation Pane Stopper
This code prevents the user from opening the form from the navigation pane.
This is necessary if you have developed a form which should only be open from another form. In other words, a form that passes information back to the form that opened it.
The terms I use for these type of forms are "Call Called" as in you have a form which is "Called" (the one you are opening) and you have the form that is opening it.... that's the "Call" form >>> Call Called.
Add the following code to the forms "On Open" Event:-
Code:
Private Sub Form_Open(Cancel As Integer)
'Application.CurrentObjectName Property (Access)
'HERE:-
'https://msdn.microsoft.com/en-us/library/office/ff196795.aspx
Dim strCurrentName As String
strCurrentName = Application.CurrentObjectName
If strCurrentName = Me.Name Then
Cancel = True
Exit Sub
End If
End Sub 'Form_Open
More Info HERE:- Navigation Pane Stopper