SQL Trouble when using VBA function

p.lorens

Registered User.
Local time
Today, 21:50
Joined
Oct 4, 2005
Messages
11
I am creating a VB application and I need to open a DAO.Recordset on a query in my Access DB (2003).

The query is using a function (written by me) stored in a module in the database.

When trying to open the recordset I get the following error message: "Run time error '3085': Undefined function '[myFunction]' in expression."

The reason I do it this way is that I have stored a lot of start and stop time values in my DB. The function calculates the number of minutes between the start and stop time, and the query uses the built in SUM-function to calculate the totalt number of minutes.

Can anyone help me to get around this?
 
From your description of your function, you could use the built-in DateDiff() function instead of your custom one.
 
Thank you. That solved my problem.
 

Users who are viewing this thread

Back
Top Bottom