Examples: SearchAllDirectories property

This button toggles the searching of all directories for lookups. The form that contains this button contains other buttons that do lookups.

Dim session As NotesSession
Dim directory As NotesDirectory
Sub Initialize
	Set session = New NotesSession
	Set directory = session.GetDirectory("myserver/Acme")
End Sub

Sub Click(Source As Button)
	Dim msg As String
	If directory.SearchAllDirectories Then
		directory.SearchAllDirectories = False
		msg = "Lookups will stop searching after the first directory with the specified view name"
	Else
		directory.SearchAllDirectories = True
		msg = "Lookups will search all directories"
	End If
	Msgbox msg,, "Search all directories?"
End Sub