Examples: GotoPos

This Visual Basic code (GotoPos_Click Sub) gets the entry at the position specified by a text box on the form.

Dim s As New NotesSession
Dim db As NotesDatabase
Dim v As NotesView
Dim n As NotesViewNavigator
Dim e As NotesViewEntry
Dim lastPosition As String
Private Sub GotoPos_Click()
On Error GoTo errorHandler
Call n.GotoPos(NavigatorForm.Position, ".")
Set e = n.GetCurrent
If e.GetPosition(".") <> NavigatorForm.Position Then
  MsgBox "Nothing at that position", , "Nothing"
  Exit Sub
End If
If e.IsCategory Then
  MsgBox e.ColumnValues(0), , "Category"
ElseIf e.IsDocument Then
  MsgBox e.Document.GetItemValue("Subject")(0), , "Document"
End If
Exit Sub
errorHandler:
MsgBox Err.Description, , "Error"
End Sub
Private Sub InitializeNav_Click()
Set s = New NotesSession
s.Initialize
Set db = s.GetDatabase("", "Web test")
Set v = db.GetView("By Category")
v.AutoUpdate = False
Set n = v.CreateViewNav
End Sub