I'm trying to display the output of a query to the user by placing the results in an Edit box. The following code actually works fine but the two For/Next loops that I'm using to format the data is awfully slow - over 3 minutes for 20,000 records. Running the query and updating the GUI element are pretty quick. Is there a more efficient way? I'm just trying to make the columns line up properly in the final output. I'm already formatting the Edit box as Courier. .... $aOk = _EzMySql_GetTable2d("SELECT `DOCID`, `NAME`, `BILLS`, `PROVIDER`, `DOCTOR_ABBREVIATION`, `ADDRESS1`, `ADDRESS2`,`CITY` FROM CONCODE ORDER BY 3 DESC,2 ") local $result = "" local $i, $j local $NumCols = ubound( $aOk) -1 local $NumRows = ubound( $aOk,2 ) -1 For $i = 0 To $NumCols Step 1 For $j = 0 To $NumRows Step 1 $result = $result & StringLeft( $aOk[$i][$j] & " ", 18) Next $result = $result & @CRLF Next ; $result gets GUICtrlSetData into an EditBox