Results 1 to 8 of 8

Thread: cannot get form1 to load form2

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2001
    Posts
    6

    cannot get form1 to load form2

    pertaining to my current problem that I'm having with getting my first form to open my second form...
    When I put the instruction that I was told to do ..
    I get an OBJECT REQUIRED error

    I named my first form Math2 and the second form Menu1

    I was told to load anyone of these instructions
    frm1created.show

    form2.show vbModel

    Load form2
    form2.show

    I subsituded the word form with math2 and menu1

  2. #2
    Lively Member nemesys777's Avatar
    Join Date
    Nov 2001
    Posts
    103
    named my first form Math2 and the second form Menu1


    Put a button on your first form(Math2)
    In the button put:::

    ----------------------------------------------------------------------------------
    Menu1.show
    -----------------------------------------------------------------------------------

    It WILL work

  3. #3
    Hyperactive Member abhid's Avatar
    Join Date
    Nov 2001
    Location
    3rd rock from the sun
    Posts
    467
    error you are talking about occurs when u try to refer some non existing object.
    This means either you have misspelled or you are trying to refer to object which is not accessible because it is declared on some other form.

  4. #4
    PowerPoster Arc's Avatar
    Join Date
    Sep 2000
    Location
    Under my rock
    Posts
    2,336
    If your second form is named Menu1 then you say "Menu1.show" in a button or something.
    -We have enough youth. How about a fountain of "Smart"?
    -If you can read this, thank a teacher....and since it's in English, thank a soldier.


  5. #5
    gaffa
    Guest
    Make sure thatyou have the words "Option Explicit" at the top of the form - this will force VB to check that every variable has been explicitly declared (so it finds the spelling mistakes really quickly)

    - gaffa

  6. #6

    Thread Starter
    New Member
    Join Date
    Nov 2001
    Posts
    6
    When I enter menu1 show in the name for the start command for menu1 I get an error Not a leagal object name

  7. #7
    Fanatic Member rudvs2's Avatar
    Join Date
    Mar 2001
    Location
    NZ
    Posts
    935
    change your form named menu1 to something different say frmMenu1

    you may be having a problem with the form being called menu


    I dont think it shuold becuase i dont recall any reserved words with that name but give it a shot anyway

  8. #8
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    rudvs2 already said it, but I always name all of my forms with the prefix frm to avoid problems like that. it's a good trend to follow.
    My evil laugh has a squeak in it.

    kristopherwilson.com

Posting Permissions

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



Click Here to Expand Forum to Full Width