Question : How to call a module function in Access 2000 database using VB query recordset?

Hi,
Here goes my code
-------------------------------------------------
Option Explicit
Dim Conn As New ADODB.Connection

Private Sub Form_Load()

    Conn.Provider = "Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=C:\windows\desktop\db2.MDB"
    Conn.Open
   
    Dim adors As New ADODB.Recordset
   
    adors.Open "SELECT  empno from table1 where replace(ucase(dept),' ','')='SW'", Conn, adOpenForwardOnly, adLockReadOnly

End sub

I have written a function named "replace" as public function in Access database module. I get error as undefined 'replace' function. How to solve this problem?

Thanks in advance.
Moorthy.

Answer : How to call a module function in Access 2000 database using VB query recordset?

Hi ssaravanamoorthy,

As far as I am aware functions internal to a Jet database are only exposed if  the application is loaded, therefor they are not able to be referenced by a connection.

Alan
Random Solutions  
 
programming4us programming4us