Hi friends,
I created a user event in my dw, and wrote a routine. Today, I've been trying to add a conditional loop, but can't save the changes due to error C0031: Syntax Error. The offending lines are the first IF statement and associated END IF .
//Loop through the attachments and print each one...
if lower(ls_forms[ li_y ]) = "attachments"
li_attachments = lds_form.RowCount()
if li_attachments = 0 then
MessageBox("Print Attachments", "No attachments to print.")
else
istr_parms = f_get_doc_directory(istr_parms)
ls_directory = istr_parms.string_arg[1]
SetNull(ls_null)
for li_this_row = 1 to li_attachments
ls_filename = this.GetItemString(li_this_row, "filename")
ls_filename = ls_directory + '\Workorder\' + string(il_workorder) + '\' + ls_filename
// Print
shellexecute(handle(this), "print", ls_filename, ls_null, ls_null, 0)
next
end if
end if
When I comment out this section, everything saves and run fine. I'm sure it's something obvious, but I'm not seeing it. Any suggestions?
TIA,
Tracy