Access query(with custom function) from Excel

L

LightLY

Dear Excel Gurus,

I am able to run an access query from Excel. However, if the access
query contains an Access custom function, I encountered problems
opening the RecordSet.

It seems that I am not able to retrieve data fields from Access which
are calculated from custom function using Excel. Is this a genuine
problem with Excel or did I miss out something?

I was working on this problem until 3am in the morning. Thank you very
much in advance if someone helps me.
 
J

Joel

You didn't specify what type of error you were getting. did you set these
references in the Tools - References menu in excel VBA

1) Microsoft Access 11.0 Object Library (or latest version on your PC)
2) Microsoft Active X data Object 2.8 Library (or latest version on your PC)
3) There are also two DAO libraries
 
L

LightLY

You didn't specify what type of error you were getting.

The error was "Type mismatch error". Under the watch window, inside
variable of type DAO.QueryDef, inside the property Parameters, there
was an undefined function.

The undefined function is a custom function used by the query in
Access. Thank you.
did you set these
references in the Tools - References menu in excel VBA

1) Microsoft Access 11.0 Object Library (or latest version on your PC)
2) Microsoft Active X data Object 2.8  Library (or latest version on your PC)

Yes, I have already set above 2 references.
3) There are also two DAO libraries

I also set Microsoft ActiveX Data Objects 2.8 Library.

Wouldn't the code fail compilation if I forget to set the references?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top