Try adding the few lines as below:
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim curdoc As NotesDocument
Dim db As NotesDatabase
Dim view As NotesView
Dim PartNo As String
Dim answer As Integer
Dim codeType As String
Set uidoc = workspace.CurrentDocument
If uidoc.IsNewDoc Then
Set curdoc = uidoc.Document
Set db = curdoc.ParentDatabase
Set view = db.GetView("BatchStatusLot
PartNo = uidoc.FieldGetText("batch"
Set doc = view.GetDocumentByKey(Part
If Not (doc Is Nothing) Then
Forall i In doc.Items
If (i.Text = PartNo) Then codeType = i.Name
End Forall
answer = Messagebox( "Duplicate " & codeType & " found. Click Ok to switch to existing document.", 1+32, "Duplicate Lot Number")
If (answer = 1) Then
if not(doc.IsResponse) then
doc.makeresponse(curDoc)
doc.save true, true
end if
curDoc.SaveOptions = "0"
Call uidoc.Close
Delete uidoc
Call workspace.EditDocument(Tru
End If
End If
End If
Main Topics
Browse All Topics





by: HemanthaKumarPosted on 2006-05-15 at 12:45:16ID: 16685221
Use MakeResponse Method of the NotesDocument
~Hemanth