Embedded view accepts only one record

dear all,

i have got a notes form having an embedded view. i am setting certain fields in the form which should be updated in the embedded view, and i also need to enter multiple records by clicking the ‘update/add record’ button (event script is given below).

With this code i seem to have a problem. Although i am able to insert one record, the second record seems to overwrite the first one, the third one overwrites the second one and so on. The bottom line is that i am not able to insert anything more than one record into the embedded view. can someone help me out of this!

thanks.

script for button click:

Sub Click(Source As Button)

Dim session As New NotesSession

Dim workspace As New NotesUIWorkspace

Dim db As NotesDatabase

Dim doc As NotesDocument

Dim uidoc As NotesUIDocument

Dim awardeename As String

Dim awardeeempid As String

Dim projectname As String

Dim dateofaward As String

Dim remarks As String

Set uidoc = workspace.CurrentDocument

Set db = session.CurrentDatabase

Call uidoc.Save

Call uidoc.Refresh

Call uidoc.Close

awardeename$=""

awardeeempid$=""

projectname$=""

dateofaward$=""

remarks$=""

Call uidoc.FieldSetText("awardeename_BC_1_dummy", Cstr(awardeename))

Call uidoc.FieldSetText("employeenumber_BC_1_dummy", Cstr(awardeeempid))

Call uidoc.FieldSetText("projectname_BC_1_dummy", Cstr(projectname))

Call uidoc.FieldSetText("otherawarddate_BC_1_dummy", Cstr(dateofaward))

Call uidoc.FieldSetText("remarks_BC_1_dummy", Cstr(remarks))

Set doc = db.CreateDocument

End Sub