Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting to Lotus Notes Database View from VB

Status
Not open for further replies.

tcurrier

Programmer
Mar 5, 2000
40
US
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'.

Thanks for any help !

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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top