Form Runs Non-Existing Function

J

JamesJ

Access 2007 sp2.
I've run the same function form the On Close of a form for years.
Curious I wanted to see what the code was. A subsequent search of all 4
code modules did not turn up the function name.
When I remove the function name form the On Close of the form the code does
not run
so I know the function is somewhere.
I'm even showing hidden and system objects in the nav bar.
In design view of the form when I click the ellipse button (...) next to the
On Close
the expression builder comes up with the function name in the top window.

Please tell me I'm not going crazy!

Thanks,
James
 
R

Rick Brandt

JamesJ said:
Access 2007 sp2.
I've run the same function form the On Close of a form for years.
Curious I wanted to see what the code was. A subsequent search of all 4
code modules did not turn up the function name.
When I remove the function name form the On Close of the form the code
does not run
so I know the function is somewhere.
I'm even showing hidden and system objects in the nav bar.
In design view of the form when I click the ellipse button (...) next to
the On Close
the expression builder comes up with the function name in the top window.

Press Ctl-G to bring up the VBA code environment. Type your function name
in the immediate pane. With the cursor someplace within the name press
Shift-F2. That will find and display the code that the function is based on
providing that...

The code is in a standard module within the database file.
or
The code is in a form module that you currently have open in design view.

If the code is in a class module or in a form/report module that is
currently not open then it will not be able to find it.
 
J

JamesJ

Actually I found it.
It was in the fom's module.
How it got there I don't know. But even it I did put there
for some reason why would the expression builder pop
up when I click the ellipse next to the property?

James
 
R

Rick Brandt

JamesJ said:
Actually I found it.
It was in the fom's module.
How it got there I don't know. But even it I did put there
for some reason why would the expression builder pop
up when I click the ellipse next to the property?

If your event property contains [Event Procedure] then the build button will
take you to the code in the form's module associated with that event. If it
contains the name of a function or macro then the "build button" assumes
that the expression builder is what you want.
 
J

JamesJ

Ok.

Thanks,
James

Rick Brandt said:
JamesJ said:
Actually I found it.
It was in the fom's module.
How it got there I don't know. But even it I did put there
for some reason why would the expression builder pop
up when I click the ellipse next to the property?

If your event property contains [Event Procedure] then the build button
will
take you to the code in the form's module associated with that event. If
it
contains the name of a function or macro then the "build button" assumes
that the expression builder is what you want.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top