O
Olga23
Gragdane, pomogite pogalujsta najti oshibku v formule:
searchFormula$ = {Form != "Company" & CpyDocID_T = "" + cstr(doc.universalid)}
Eta stroka vzyata iz etogo koda:
Sub Initialize
Dim collection As NotesDocumentCollection
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim doc1 As NotesDocument
Dim view As NotesView
Dim session As New NotesSession
Set db = session.CurrentDatabase
Set view = db.GetView( "AllByName" )
Set doc = view.GetFirstDocument
While Not ( doc Is Nothing )
searchFormula$ = {Form != "Company" & CpyDocID_T = "" + cstr(doc.universalid)}
Set collection = db.Search(searchFormula$, Nothing,0)
Set doc1 = collection.GetFirstDocument()
While Not(doc Is Nothing)
doc1.VerbandsG = doc.VerbandsG
Call doc1.Save( True, False )
Set doc1 = collection.GetNextDocument(doc1)
Wend
Messagebox collection.Count, , "Child documents found"
Set doc = view.GetNextDocument( doc )
Wend
End Sub
Vsem premnogo blagodarna
searchFormula$ = {Form != "Company" & CpyDocID_T = "" + cstr(doc.universalid)}
Eta stroka vzyata iz etogo koda:
Sub Initialize
Dim collection As NotesDocumentCollection
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim doc1 As NotesDocument
Dim view As NotesView
Dim session As New NotesSession
Set db = session.CurrentDatabase
Set view = db.GetView( "AllByName" )
Set doc = view.GetFirstDocument
While Not ( doc Is Nothing )
searchFormula$ = {Form != "Company" & CpyDocID_T = "" + cstr(doc.universalid)}
Set collection = db.Search(searchFormula$, Nothing,0)
Set doc1 = collection.GetFirstDocument()
While Not(doc Is Nothing)
doc1.VerbandsG = doc.VerbandsG
Call doc1.Save( True, False )
Set doc1 = collection.GetNextDocument(doc1)
Wend
Messagebox collection.Count, , "Child documents found"
Set doc = view.GetNextDocument( doc )
Wend
End Sub
Vsem premnogo blagodarna