more on VBA function name change

Discussion in 'Access VBA Modules' started by John B. Smotherman, May 28, 2010.

  1. 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.
     
    John B. Smotherman, May 28, 2010
    #1
    1. Advertisements

  2. 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


    "John B. Smotherman" <> wrote in
    message news:...
    >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.
     
    Jeanette Cunningham, May 29, 2010
    #2
    1. Advertisements

  3. John B. Smotherman

    david Guest

    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)


    "John B. Smotherman" <> wrote in
    message news:...
    >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.
     
    david, Jun 1, 2010
    #3
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. valentine
    Replies:
    6
    Views:
    225
    valentine
    Jul 16, 2003
  2. Replies:
    1
    Views:
    108
    Dirk Goldgar
    Sep 7, 2005
  3. vince6501
    Replies:
    5
    Views:
    133
    justme
    Feb 1, 2007
  4. JR
    Replies:
    6
    Views:
    178
  5. Tony Vrolyk
    Replies:
    9
    Views:
    188
    Tony Vrolyk
    Jul 12, 2007
  6. Sam
    Replies:
    1
    Views:
    217
    George Nicholson
    Jan 7, 2008
  7. John B. Smotherman

    VBA function changing name

    John B. Smotherman, May 24, 2010, in forum: Access VBA Modules
    Replies:
    1
    Views:
    180
    BruceM via AccessMonster.com
    May 24, 2010
  8. John B. Smotherman

    VBA function changing its name

    John B. Smotherman, May 24, 2010, in forum: Access VBA Modules
    Replies:
    0
    Views:
    177
    John B. Smotherman
    May 24, 2010
Loading...