Examples: LimitMatches property

This button toggles the limiting of matches returned 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.LimitMatches Then
		directory.LimitMatches = False
		msg = "Lookups will return all matches"
		directory.LimitMatches= True
		msg = "Lookups will return only the first 50 matches"
	End If
	Msgbox msg,, "Lookup limit changed"
End Sub