Results 1 to 8 of 8
  1. #1
    Join Date
    Dec 2004
    Posts
    277

    Unanswered: won't open my forms VB Module

    Everytime I try and Build Event on any control in this form it will not open the module for it. It opens another forms, and when i go to window and see more windows the module does not come up on the list. DOes anyone have any ideas of what causes this? It happed with me yesterday but it somehow fixed itself within minutes

  2. #2
    Join Date
    Jul 2004
    Location
    Inverurie
    Posts
    628
    have you tried repairing your database?

  3. #3
    Join Date
    Dec 2004
    Posts
    277
    yea that doesnt change anything

  4. #4
    Join Date
    Jul 2004
    Location
    Inverurie
    Posts
    628
    this is a bit of a shot in the dark, but re-booting your pc?

  5. #5
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926

    VB Module

    Just a thought - do you have any functions/event procedures with the exact same name?

    You could also try creating a new database and import all the forms, queries, etc.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  6. #6
    Join Date
    Dec 2004
    Posts
    277
    Quote Originally Posted by pkstormy
    Just a thought - do you have any functions/event procedures with the exact same name?

    You could also try creating a new database and import all the forms, queries, etc.
    Yes I do... so that is possibly what is doing that to me?
    Think it could affect other things?

  7. #7
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    life gets complicated when two modules are in scope having variables or procedures with the same name ...maybe A will choose Me! first, but for a proc not in Me! ...who knows?

    maybe use unique var/proc names throughout the application, so even if A has to search exhaustively for myStrangeRoutine() it finds none or one of them rather than making it's own choice from a bunch of similarly named procedures.

    personally i don't do that: my standard dao.database is "dabs", my standard dao.recordset is "recs", my standard SQL is "strSQL", and it all seems to work fine.

    ...maybe the problem is not (or not only) reusing var/proc names... maybe something else broke down in the "modularity" of your code.

    do you have stuff declared "public" that should be "private" ?? search all your code for "public" and make sure each use is justified.

    are you using Me! where appropriate?? (Me! also speeds things up a touch, saving A the time to check what else imght be in scope at the moment)

    are you explicitly setting each object variable = Nothing when you quit a routine??
    anything you use
    Set Xxxx = Yyyy
    to create, should have a corresponding
    Set Xxxx = Nothing
    in the exit routine

    izy
    currently using SS 2008R2

  8. #8
    Join Date
    Dec 2004
    Posts
    277
    that is definitely something that could be as well

    because i do not set anything to nothing when done

    dang meng!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •