Hi Mike
Since he's running a sql, _tally will be set, however if the SQL returns no records, the array will not be created an alen will crash.
>_TALLY is for tables, if you are using an array try using ALEN()
>
>>Hi,
>>Make sure that is at least ONE record matched in your query.
>>
>>
>>SELECT MAX(myField) FROM (ALIAS()) INTO ARRAY laArray
>>
>>IF _TALLY > 0
>> THISFORM.txt.Value = laArray + 1
>>ENDIF
>>
>>
>>HTH