>>Hi Dragan,
>>
>>Actually, I switched back to this index, but now I used Vlad's solution and it worked just fine.
>>
>>lcFor = iif(m.llPassed, ;
>> [for bintoc(DSID)+ExtrYear+ExtrWeek=bintoc(] ;
>> + transform(m.tnDsID)+[)+']+m.lcIssue+['], ;
>> [for State+ExtrYear+ExtrWeek=']+ m.lcStateWeek+['])
>>
>
>Either way you had to avoid macroexpanding the expression bintoc() returns, because it may contain any ugly characters which shouldn't appear in a string constant - apostrophes, quotes, double ampersands, EOF markers, CR/LFs etc etc.
Right, exactly. I found it the first time (the string contained CR chars)
If it's not broken, fix it until it is.
My Blog