Thanks for your explanation and your time.
but i did not totally understand !
'-----------------
A UDF function will only get called if a cell that has a
| dependency to the UDF gets changed.
***OK
| So if you are only calling this UDF infrequently then it
| is acceptable to to put the query into a UDF.
*** i want to call a user defined fonction in a query
not put the query into a UDF
if we can't, it was my question ...
| If you have hundreds of these queries then it will take
| a long time to open the workbook because opening
| the workbook will update all the queries.
'-----------------
**** Ok, i was using a sheet in the same workbook for conducting my test.
When a connexion is established to a workbook, this connexion may
and can support as many queries as required to the same database till
the connexion is closed. isn't it ?
You did a helpful intervention. Thank.
Each time the function is called a connection will be made to the database.
The connection is similar to opening the file that it has to transverse the
file system to find the file and look inside the file without opening the
file. Opening a file usually requires moving the data in the file into
memory on your PC. A connection doesn't have to move the data onto the PC.
1) Reading the data from access is the quickest
2) A connection from excel is slower than getting data directly from an
Access macro
3) Opening the database from excel is the slowest method.
:
Hi Joel,
You comment about the time required to perform the task...
First of all, can we used a user function ? Any example to show ?
Do you know why is possible to do this in Access and not in Excel ?
How about a web site, a tutorial discusssing about this subject ? Any suggestion ?
Thanks for your participation.
"Joel" <
[email protected]> a écrit dans le message de groupe de
discussion
:
(e-mail address removed)...
I'snt this going to be slow? It means every time you modify the cell a new
connection has to be established. Would it be better to perform a query
returning all the fields, then lookup the value you need in the query results.
:
Hi Patrick,
| wasn't this an earlier question? I responded that I wasn't able to do this
| but I'm sure that there's a way to do it.
Personally, it's the first time i ask this question.
Someone of this group gave this exemple... and it works too
"SELECT DISTINCT Sum([MyField]) AS SumofMyField FROM...
But how about a user fonction ? And more generally speaking
what functions are available in ADO for a Query in an Excel environment ?
Thanks.
:
Hi,
Is it possible to employ a user fonction in a query with ADO in Excel ?
If yes, is it possible to get a few examples which syntax should i used ?
For example, this one works :
SELECT Left(MyField,2) From .... But i can't integrate a personal fonction !
Any suggestion about a web site discussing of this subject is welcome.
Thanks for your time and your collaboration.