Link to home
Start Free TrialLog in
Avatar of leezac
leezac

asked on

Call Function

How can I call the Function in the attached database?
db26.zip
Avatar of Bill Ross
Bill Ross
Flag of United States of America image

Hi,

In vba you "call" a subroutine like this:

call MySub

In vba you execute a function like this:
Dim vReturnValue
vReturnValue = MyFunction()

In general subs do work and functions return values.

Regards,

Bill
Avatar of leezac
leezac

ASKER

I am not sure how to do in module. Can you add to the attached database and send back.  

I need to see how to apply to the code in the attached database.
ASKER CERTIFIED SOLUTION
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of leezac

ASKER

I changed the Dim statement -

Dim mdl As Module
   
    Set mdl = Modules(ModuleName)
 
Please see attached database.   I added call on On Click on form, but still does not work....
db26.zip
What is the intent of this code ?
What is it supposed to be doing ?

Did you write this code or get it from somewhere else ?


mx
Avatar of leezac

ASKER

LSM was helping me on another post: https://www.experts-exchange.com/questions/27831808/Code-to-search-for-filename-and-replace.html

but I can't get to work.

I am needing to be able to search MSAccess Databases on O;/ for VBA in modules and forms to find a string.  I do not need to replace right now - just be able to do search.

If I could also show the string somehow in a table or on form like in the attached.

The example of a database I found is attached, but it searches tables and you have to import into each database.
dbSearchAll.zip
Are you able to get LSM to respond ... and help with this ?

mx
Avatar of leezac

ASKER

Not yet.