JohnyHooker
Programmer
I'm using MS Access database and I need to use my own functions in SELECT query, like this:
SELECT SomeTable.Name AS Name, MyFunction(SomeTable.Value) AS Result FROM SomeTable;
In access, I created some module and into that module I wrote the function like this: (in VB)
Sub MyFunction(value As Integer) As Integer
MyFunction = value+1 'for example
End Sub
(simply - the function computes some value form the given arguments - e.g. "sin(x)" function )
When I tried this query in MS Access, it worked perfectly, but when I passed the SAME query on the SAME database form "outdoor" (I mean -not from access, from VC++ program, .asp page and so on) I receive error message: undifined function 'MyFunction' (it seems as if the module wasn't found by the JET engine).
Can anybody help what I'm doing wrong ?? I need fuctions to compute some values in queries but I don't know how to do that.
Thanks for any help
Honza Kotera
SELECT SomeTable.Name AS Name, MyFunction(SomeTable.Value) AS Result FROM SomeTable;
In access, I created some module and into that module I wrote the function like this: (in VB)
Sub MyFunction(value As Integer) As Integer
MyFunction = value+1 'for example
End Sub
(simply - the function computes some value form the given arguments - e.g. "sin(x)" function )
When I tried this query in MS Access, it worked perfectly, but when I passed the SAME query on the SAME database form "outdoor" (I mean -not from access, from VC++ program, .asp page and so on) I receive error message: undifined function 'MyFunction' (it seems as if the module wasn't found by the JET engine).
Can anybody help what I'm doing wrong ?? I need fuctions to compute some values in queries but I don't know how to do that.
Thanks for any help
Honza Kotera