Why is Access renaming the class objects in VBA

Posted on 2008-11-19
Last Modified: 2013-11-28

Please see the attached pictures. I have an Access database which has been emailed to me by a friend in another country. The DB works fine for him, he can send me the exact same file and it wont work for me. We think we have identified the problem - in the first screenshot you can see the names of the forms. in the second screenshot you can see the names of the class objects in VB behind the forms. Why is Access (or VBA) adding 'Form_' to each name of the class objects?
my friend checked the same issue when he has the database and the names of the forms and the class objects are the same..
I also have the same problem with the names of the reports and the names of the class objects behind them.
I cannot rename the class objects. i can rename the forms but when i did (i added 'Form_' to the beginning of each form name) in VB the class modules came up as 'Form_Form_' for each one...
I am using acess 2007, my friend is using Access 2007 also without problems. The database was created in Access 2003..

Please help..


Question by:laserhalen
    LVL 46

    Expert Comment

    In VBA the form always appears with "Form_" before it.
    Check what it looks like in the other country.

    Author Comment

    Hi thanks for your reply and yes you are right i requested a screenshot from the other country (Brazil) and the class objects have all got 'Form_' before the names.. I was previously told otherwise but nevermind..
    the original problem with the database is outlined in the attached i mentioned, the database works fine for him but gives me the problems, see attached screenshot..

    LVL 46

    Accepted Solution

    Check that he doesn't have any special characters that aren't supported on your system.

    Author Comment

    Im sorry but id have to ask you where exactely, in the VB code or throughout the database?
    I guess throughout the database..

    Author Closing Comment

    Thank you, I changed the locale of my system and the application works fine. I am ashamed to have wasted some of your time with what turned out to be a simple problem.
    LVL 46

    Expert Comment

    Glad to help

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
    Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
    In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
    In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now