Tony, perhaps the following example can help you. Please note that there is no check if the table exists. '**************************************************************************** sub MakeStringValueArray(ByVal sTName as string, ByVal sColName as string, sArray() as string, iCount as integer) '**************************************************************************** ' Given the name of an open table and the name of a column in that table, ' returns an string array containing the values in that col. '**************************************************************************** Dim aCol as Alias Dim TabSize, i as integer OnError Goto STANDARD_ERROR_HANDLING iCount=TableInfo(sTName,TAB_INFO_NROWS) If iCount = 0 Then redim sArray(1) sArray(1) = "No data found." Else i = 0 redim sArray (iCount) fetch First from sTName while not EOT(sTName) i = i + 1 redim sArray (i) OnError Goto COL_NOT_FOUND aCol = sTName + "." + sColName sArray(i) = str$(aCol) Fetch Next From sTName wend End If exit sub COL_NOT_FOUND: note error$() + " (" + sTName + " / " + sColName + ")" exit sub STANDARD_ERROR_HANDLING: note error$() + " (" + sTName + " / " + sColName + ")" print error$() + " (" + sTName + " / " + sColName + ")" End sub Regards i.A. Franz-Josef Behr ------------------------------------------------------------------------ Dr. Franz-Josef Behr Phone: ++49 / 7243 / 5641-20 GIS-Consultant Fax: ++49 / 7243 / 5641-99 Graphservice GmbH EMail: [EMAIL PROTECTED] Im Ermlisgrund 18 D-76337 Waldbronn WWW: http://www.graphservice.de Personal Home Page: http://home.pages.de/~fjbehr und http://www.gis-news.de
begin:vcard n:Behr;Franz-Josef tel;cell:0179 / 50 600 35 tel;fax:+49 (0) 7243 / 56412-99 tel;work:+49 (0) 7243 / 5641-20 x-mozilla-html:FALSE url:www.graphservice.de org:Graphservice GmbH;Beratung adr:;;Im Ermlisgrund 18;Waldbronn;Baden-Württemberg;76337;Deutschland version:2.1 email;internet:[EMAIL PROTECTED] note;quoted-printable:Beratung=0D=0AKonzeptentwicklung=0D=0AGI-Schnittstellen=0D=0ADatenmodellierung=0D=0AMapInfo / MapBasic x-mozilla-cpt:;-16896 fn:Dr. Franz-Josef Behr end:vcard