I need to pull a couple more fields (different table) into the document. Can I just insert a qry2.SQL=… in the section below before executing the result.execute? …then add “doc.Class_Code = result.GetValue…” after the final line in the script below (+ the second filed)?
Set qry.connection = con
Set result.query = qry
qry.SQL = "SELECT * FROM VENDLIB.TTCCW"
result.Execute
If Not result.isresultsetavailable Then
Messagebox "Resultset Not Available"
Else
Do
result.NextRow
'add new document to database for each record in TTCCW
Set doc = New NotesDocument(db)
doc.Form = "Vendor Profile"
doc.Processed = "Yes"
doc.Vendor_Number = result.GetValue("TTCSNO", lval)
doc.Vendor_Name = result.GetValue("TTCSNM", string1)
…