more on VBA function name change


J

John B. Smotherman

I thought I'd start a new thread since I haven't received any replies to my
first one...

To recap:
I've declared a function in a module using mixed case:
Function TMDE_Category (FormName As Form)

I noticed recently that it appeared in the module as
Function tmde_category(FormName As Form)

I changed it back to the mixed case declaration, saved the module, exited
the app, reopened it and looked. The function had changed back to the all
lowercase declaration.

Things I've tried since the original post:
Using the databse documenter, I selected all objects in the database and
saved the resulting report as a pdf file, so I could search all 2700 pages of
it. Originally, I found 3 instances of the all lowercase version of the
function in some query definitions (there's a field in a table with the same
name as the function), so I changed the name of the field in the table to
mixed case, and changed the query definitions also. Reran the database
documenter, re-searched the pdf file, every instance of TMDE_Category is in
mixed case - except the module where the function is declared, where it is
lowercase - again.

Thinking there's a symbol table somewhere that I'm not finding, I completely
removed the function from my application; compiled; saved; exited; reopened
with the decompile switch; compacted and repaired the database; exited.
Reopened the application; inserted the function with mixed case (from a plain
text file); saved the module; exited. Reopened and looked - sure enough the
function is once more all lowercase.

Anyone have an idea before I pull out ALL of my hair?

Thanks.
 
Ad

Advertisements

J

Jeanette Cunningham

Here is what I would do.

Rename Function TMDE_Category (FormName As Form)
to
Function MyTMDE_Category (FormName As Form)

Then use debug.compile to find all other instances of TMDE_Category and
tmde_category, and replace them with MyTMDE_Category.

I am not concerned about why you have this problem, but I expect that the
above steps would fix it.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
Ad

Advertisements

D

david

You have to change the name to change the case.

Note, you don't have to change the whole database,
just change the name of the function to something else,
then change it back with the correct case.

(david)
 

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