I have a Visual Basic program from which I'd like to set up a command button, that when clicked, will bring up a Lotus Notes Database view. The database apparently opens, but I'm unable to bring up the 'VIEW'.
Can anyone help me out with what I'm missing here? Thanks!
Here is the code:
Can anyone help me out with what I'm missing here? Thanks!
Here is the code:
Code:
Public Sub openupdb()
Dim notesdb As Object
Dim session As Object
Dim n_View As Object
Dim n_ViewNav As Object
Dim n_ViewEntry As Object
Set session = CreateObject("Notes.Notessession")
Set notesdb = session.GETDATABASE("MYSERVER/SVR/MyCompany/US", "MYDBS\rmphbk.nsf")
If notesdb.ISOPEN = True Then
MsgBox ("Database :" & notesdb.Title & " is open")
Set n_View = notesdb.GetView("A. Name \ Last Name")
Set n_ViewNav = n_View.CreateViewNav
Set n_ViewEntry = n_ViewNav.GetFirstDocument()
Else
MsgBox ("Database is not open")
End If
End Sub