[AccessD] Fill array from a record

Doug Steele dbdoug at gmail.com
Thu Sep 2 18:07:00 CDT 2010


Thanks, Charlotte, that's what I was thinking of.  My brain was stuck on
'CopyToArray'.  At least my memory is semi-functional - at my age, I guess
that's all I can hope for.

Doug

On Thu, Sep 2, 2010 at 3:39 PM, Charlotte Foust
<charlotte.foust at gmail.com>wrote:

> There's a GetRows function, in 2007 at least, and if I recall it was
> in 2002 as well:
>
>  Set dbsNorthwind = CurrentDb
>   strSQL = "SELECT FirstName, LastName, Title FROM Employees"
>   Set rstEmployees = dbsNorthwind.OpenRecordset(SQL, dbOpenSnapshot)
>
>   varRecords = rstEmployees.GetRows(3)
>   intNumReturned = UBound(varRecords, 2) + 1
>   intNumColumns = UBound(varRecords, 1) + 1
>
> Charlotte Foust
>
> On Thu, Sep 2, 2010 at 3:13 PM, Doug Steele <dbdoug at gmail.com> wrote:
> > Isn't there a function in Access to copy the fields of a row directly to
> an
> > array?  I thought there was, but I can't find anything in help
> >
> > Thanks,
> > Doug
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> >
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>



More information about the AccessD mailing list