Hi Gene,
Any chance your variables/fields that your using to build the command string have quotes in them?
>here is the code, the error occurs on the last line, but it doesn't happen all the time. Just every now and then. Any suggestions:
>
>ThisForm.List1.RowSourceType = 0
>ThisForm.List1.RowSource = ''
>
>cReportProcedure = alltrim(rep.rep_prg_nm)
>
>lcDo = "do " + lcRep + " with 'disad', .T., .T., " + ;
> alltrim(str(rep.rep_pk)) + ", '" + lcCompanyName + "'"
>&lcDo
>
>select rep
>
>ThisForm.List1.RowSourceType = 6
>ThisForm.List1.RowSource = 'Rep.rep_ds'
kenweber
GCom2 Solutions
Microsoft Certified Professional