Calling a Procedure

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

This sounds simple, but it's not working.

I have (2) forms in a database, and one module titled "Results." . There
are (2) Private Sub Procedures in the Module. Clicking a button on one of
the forms calls the first procedure in the module, and it works, no problem.
When I try to call the other procedure in the module from the same form it
can't be found. It wont grab it with the auto-complete in the editor either.
Why is this happening?

Alos - how do you name/rename a module? I can't remember how I did it
originally.

Thanks in advance.
 
If the procedures really are declared as Private, then the mystery is not
why one of them doesn't work, but why one of them does. You should not be
able to call a Private procedure from anywhere except within the same module
where the procedure is declared. If you want to call them from outside the
procedure, they should be declared as Public.

To rename a module, just right-click the module in the Access database
window and choose 'Rename' from the shortcut menu.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 
Back
Top