Now I will try to be clear about my issue :
First example :
Imagine you have a table into one Access database called "Customers"
Inside this table you have many records with several fields
One of these fields is the name of the customers
One of these fields is the address of the customers
IŽd like to return to an Excel Worksheet the address of a specific customer inside this Access table using a function (UDF)
Note that I need to specify in the worksheet:
- the path where this database is located
- the name of the database
- the name of the table
- the name of the fields involved to return the address of a specific customer
Second example :
Now imagine you have a table into one Access database called "Sales"
Inside this table you have many records with several fields
One of these fields is the name of the customers
Another field is the period of the sales occured (month)
Another field is the amount of sales
IŽd like to return to an Excel Worksheet the amount of sales of a customer in one specific month using a function (UDF)
Note that I need to specify in the worksheet:
- the path where this database is located
- the name of the database
- the name of the table
- the name of the fields involved to return the sales of a customer in one specific month
I imagine one function like this (although I do not know how to do it)
ImportAccessData(A1;A2;A3;A4:A5)
Where :
A1=the path where the Access database is located
A2=the name of the Access database
A3=the table name
A4:A5=the range where the criteria will be input (this range must include in the first line all the field names and in the second line the records which will define the information required)
Note that I only want return one specific information to store in one cell of the Worksheet. I do not want to link the entire table to the Worksheet.
Any additional explanations do not hesitate to ask me.
Thanks,
Ilmo
Bookmarks