C
Charles
Hello
I can already make Access and XL to communicate in VBA, through DAO
and recordsets, but I have the following problem: I have some
calculations to run on a database with 100,000s of records. These
calculations are a bit too complex for an sql query, so the easy
solution is to run a VBA code to do it.
I have two solutions. Either run the code from XL where the master
code is, and gather all the data from Access using an DAO recordset,
and run the data in XL/VBA. The problem is that recordsets seem to be
very slow. Is there any way to load data very quickly in one go (I
have the feeling Excel and Access are exchanging data each time I do
rcd.movenext, it would be more efficient to transfer directly a large
array in one go instead, but is it possible?)
The other solution I see is having the code sitting in Access and
launching the code from XL. I can do that using a function in Access
and a macro that launches that function in Access. And I can simply
run the macro from XL. What I can't do is to give an argument to this
function, which is problematic for me. Is there anyway to launch some
code in Access from VBA by passing some arguments to this code?
Any help greatly appreciated!
Thanks
Charles
I can already make Access and XL to communicate in VBA, through DAO
and recordsets, but I have the following problem: I have some
calculations to run on a database with 100,000s of records. These
calculations are a bit too complex for an sql query, so the easy
solution is to run a VBA code to do it.
I have two solutions. Either run the code from XL where the master
code is, and gather all the data from Access using an DAO recordset,
and run the data in XL/VBA. The problem is that recordsets seem to be
very slow. Is there any way to load data very quickly in one go (I
have the feeling Excel and Access are exchanging data each time I do
rcd.movenext, it would be more efficient to transfer directly a large
array in one go instead, but is it possible?)
The other solution I see is having the code sitting in Access and
launching the code from XL. I can do that using a function in Access
and a macro that launches that function in Access. And I can simply
run the macro from XL. What I can't do is to give an argument to this
function, which is problematic for me. Is there anyway to launch some
code in Access from VBA by passing some arguments to this code?
Any help greatly appreciated!
Thanks
Charles