Create categorized view

I have another question regarding a problem I’m trying to figure out. I’ve three columns in my view, “Cate”, “First Name” and “Last Name”. My problem now is that why is that if I didn’t close and reopen my form (as in close the preview and click on Preview Notes again), I could not save more than one document in my view. In another words, if the preview the form and enter 2 documents, the second document overwrites the first document.

Sub Click(Source As Button)

Dim s As NotesSession

Dim db As NotesDatabase

Dim uiws As NotesUIWorkspace

Dim uidoc As NotesUIDocument

Dim v As NotesView

Dim doc As NotesDocument



Set s = New NotesSession

Set db = s.CurrentDatabase

Set uiws = New NotesUIWorkspace

Set uidoc = uiws.CurrentDocument

Set v = db.GetView("topic")

Call uidoc.Save

Call v.Refresh()

Call uidoc.Refresh()

End Sub

*i’ve only started learning notes/domino this week. so there are a lot of questions I need to clarify. Thanks.

Subject: Create categorized view

As long as the form remains open, it is an interface to edit a single document. Your button code saves the document, but all that does is commit the changes you have made so far to the database, so you are still working with the same document. You would need to close the current document (uidoc.Close) and compose using the form again (uiws.ComposeDocument(“FormName”)) in order to create a new document.

Subject: RE: Create categorized view

Ok, I got it working. Thanks