Hey pple,i’m having some prob in field declaration in Do…while statement.
eg. in collection.count from a particular view, there are 3 documents. i’m trying to port these 3 documents’ data into form A using Do…while statement.
form A contains a simple table with the following fields:
submitted1, claimant1, manager1
submitted2, claimant2, manager2
submitted3, claimant3, manager3
thus during the iteration, i’m trying to use a tmp counter to determine fields in form A shd be assigned.
Set doc11=collection.GetFirstDocument
tmpcount = 1
Set db1 = s.currentdatabase
Set doc1 = db1.CreateDocument
Do While Not (doc11 Is Nothing)
doc11.editmode = True
doc11.sendforapproval= “Yes”
doc1.form = “Petty Cash Approval”
doc1.requestedby = s.CommonUserName
doc1.requesteddate = Format$(Now, “dd-mmm-yyyy hh:nn AM/PM”)
doc1.submittedby&tmpcount = doc11.Submitted(0)
doc1.claimant&tmpcount = doc11.Claimant(0)
doc1.manager&tmpcount = doc11.Manager(0)
Call doc1.Save(True,False)
Call doc11.Save(True,False)
Set doc11 = collection.GetNextDocument(doc11)
tmpcount = tmpcount + 1
Loop
but of course it doesnt work…hope someone is able to help me.
thanks