Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Custom function won't work with ODBC connection

Status
Not open for further replies.

ktb916

Programmer
Jan 22, 2004
76
US
I have created a custom date function in an access database. I'm using the function in an access query and it works fine - however if i try to pull the information into excel through MS Query i get an error "function not defined" apparently this has to do with the ODBC connection. Is there anyway to make this work?

KT
 
ktb916,

Hey a shot in the dark...

In Excel press Alt+11 (Brings up VB Editor). Select Tools > References. Verify you have select the Microsoft DAO (or ADO) is selected. I am not sure which MS Query uses. Try one then the other.

Also in Access verify that the libraries contained in the References Collection.

I have seen something similar before.

Sorry.. about the only thing I can suggest.

Good Luck...

 
Tried selecting the references but it still didn't work.

Thanks anyway

KT
 
i see where you are going but unfortunately it didn't work -let me explain the whole story - i created a reference library database and put this custom date conversion function in it - then i added a reference to it in an access project i was working on - from there i created a query in access and used the function in the query to convert a string to a date format - then i wanted to pull that data into excel using MS Query and this is where i get the error. i'm thinking because it is a function i created and not a standard function MS Query can't recognize it - i'm thinking i might need to build the function in excel. However feel free to let me know if you have other ideas - I'll be happy to give them a shot - By the way the article you sent me to will difinetly be helpful in the future i suspect.

Thanks,

KT
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top