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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help in Module ?

Status
Not open for further replies.

altctldel

Programmer
Dec 15, 2000
17
IN
I think there is no REPLACE function in Access 2000.

I had written a module to replace a character in a field and the module name is Repl()

when tried to execute a query with the above method from Visual Basic application,
I got an ODBC Error : Undefined function Repl()

My question is how to execute the query from Visual BAsic Application.
Or
Is there is any Built-In function available to replace a character.

 
This isn't a ODBC error. It usually occurs when you name a module and a function the same or when you're defined the scope incorrectly. Make sure that you've created a PUBLIC function and make sure the module and function have different names.

HTH

Craig
 
thanx both of u for your reply.

To Craig0201 -
My function name Repl() and it has a public scope. My function Repl() works fine in Query, if it is executed in Access.
Same query throws an errors if it is executed from Visual basic6 using ODBC.
For Your reference error displayed is "Unknown Function Repl()


------------------------------------------------------------

To JohnYingling -
I want solution for replace string in SQL Query not in Visual Basic.
 
Your function Repl is stored in Access.
When you execute the query from outside of Access it doesn't know to use that query. Copy Repl into your vb app and it might work then.

Ben ----------------------------------
Ben O'Hara
bo104@westyorkshire.police.uk
----------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top