Re: Tips on domain aggregate replacements



Hi,

Have you tried GetRows on a recordset (ADO or DAO)? That return a transposed
array of variant of your records. Being transposed, the records are disposed
in columns (second index), the field are disposed in lines (first index) and
indices start at 0. See the help file.

One of "the" problem with data in "memory" is that you cannot easily share
it with other users (in addition to eventually consume a lot of memory). I
won't suggest that solution except for very simple tasks.

Hoping it may help,
Vanderghast, Access MVP



"Brian" <Brian@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:5022F742-E256-45EC-8DEA-2A0F6A5FA230@xxxxxxxxxxxxxxxx
> Everything I am reading tells me I should minimize my use of domain
> aggregate
> functions, so I am in the process of going through several apps to replace
> these. In many cases, I can use a join in a query, but there are times
> when I
> need to run the statement from VBA. I need a tip on how to accomplish
> this.
>
> I know how to run action queries using RunSQL, but (how) can I run select
> queries to return Max, Sum, etc. results to a variable or array in VBA?


.



Relevant Pages

  • Re: Slow Macros in Excel 2007
    ... In windows excel VBA you would generally use ADO/DAO recordsets and ... You can also transfer a recordset directly to an array ... The Array function in VBA is oriented towards constants rather than data ... Worksheet using a *SINGLE* VBA instruction. ...
    (microsoft.public.excel.programming)
  • Re: Array Formulas in VBA
    ... I finally figured it out Jim. ... There's a "feature" in VBA that screws up the one particular case I happened to be using as an example. ... When using a Variant as an array, you have to declare the size ... Dim varArray As Variant ...
    (microsoft.public.excel.programming)
  • Retrieving Data: Speed of beating down rows vs retrieving from array?
    ... Got a "What If" area on a worksheet. ... Tom Ogilvy suggested vLookup which I guess is the standard way of ... VBA code doing the same thing? ... the array once when the workbook is opened, ...
    (microsoft.public.excel.programming)
  • Re: DOS access from Excel
    ... two member array. ... good practice in VBA. ... Set objShell = CreateObject ... MAC for the PC. ...
    (microsoft.public.excel.programming)
  • Re: Dictionary object: Error assigning user defined data type to item
    ... But, if you have a problem with an array, a simple ... workaround is to create a variant, redim it to an array and use the ... Dim x As Dictionary ... Excel, PowerPoint, and VBA add-ins, tutorials ...
    (microsoft.public.excel.programming)

Loading