StaRKeY
starkey at wanadoo.nl
Fri Feb 6 10:45:13 CST 2004
Hi all, Nothing against an array but did you also consider a (class)collection? Regards, Eric Starkenburg -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of MartyConnelly Sent: vrijdag 6 februari 2004 17:23 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Function Return array? Or you can pass by reference Public Sub Test1() Dim aryTest1(1 To 3) As Integer Dim i As Integer For i = 1 To 3 Step 1 aryTest1(i) = i Debug.Print aryTest1(i) Next i Call Test2(aryTest1()) For i = 1 To 3 Step 1 Debug.Print aryTest1(i) Next i End Sub Public Sub Test2(ByRef aryTest2() As Integer) Dim i As Integer Dim j As Integer Dim k As Integer j = LBound(aryTest2) k = UBound(aryTest2) For i = j To k aryTest2(i) = i * 2 Debug.Print aryTest2(i) Next i End Sub S D wrote: >Hi group, > >I have a function that builds an array. Is it possible to let the function return the array? > >Any ideas? > >TIA >Sander > > >--------------------------------- >Do you Yahoo!? >Yahoo! Finance: Get your refund fast by filing online >_______________________________________________ >AccessD mailing list >AccessD at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/accessd >Website: http://www.databaseadvisors.com > > > -- Marty Connelly Victoria, B.C. Canada _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com --- avast! Antivirus: Outbound message clean. Virus Database (VPS): 3-2-2004 Tested on: 6-2-2004 17:45:13 avast! is copyright (c) 2000-2003 ALWIL Software. http://www.avast.com