
Public functions, easy question
writes:
Quote:
>I have code attached to a button on one form. I wrote a function that
>this button called that I declared as Public Function
>calc_results(parameter). Now I want to use this function from another
>form. How do I do this? When I just call the function, I get an unknown
>function compile error. If I try to declare it, it wants me to specify
>a library and I have no idea how to set that up. I looked at the object
>browser, but cannot figure out what I am supposed to do. Please help.
As well as declaring the function as Public, you must also make sure that it is
available to Access. If the form that has this function in is not open when you
try to run the function, you will get an error. The best thing to do is to
remove your function from where it is at the moment, and place it in a
standalone module, where it will be accessible from all forms in your database.
Jon
Access tips & tricks - http://www.applecore99.com
Microsoft Access webring -
http://nav.webring.yahoo.com/hub?ring=microsoftaccess