Undefined function in expression

S

Salomon Reyes

I hope someone helps me with this (I've been bugged by this one):


My environment consists of an Access 2003 database which contains some
stored queries. In particular, the one I'm working with is called
'viewPatient' which contains some Visual Basic functions. The 'viewPatient'
query works within Access fine. Unfortunately, I cannot call 'viewPatient'
from Visual Basic 6.0 nor Visual C++ 6.0. I get the error "Undefined
function 'GetPhone' in expression". viewPatient is a stored query which
contains 'GetPhone' in it's select statement. Now 'GetPhone' is a Visual
Basic public function (not a form) that is accessible wihin Access 2003 but
not to an outside program like Visual Basic 6.0 nor Visual C++ 6.0. I
thought the problem could be a 'sandbox' problem so I disabled it in the
registry (value 0). No luck!!! I even tried to bring the public module
'GetPhone' into my Visual Basic project but no luck either. Can someone
provide me help with this?

Thank you.
(I'm a newbie to VB)
Edit/Delete Message

url:http://www.ureader.com/gp/1060-1.aspx
 
D

Douglas J. Steele

Sorry, but you're stuck.

When you're communicating with Jet databases (i.e. MDB files) from outside
of Access, you cannot use user-defined functions. That's because the Jet
Engine doesn't know anything about VBA.
 

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