Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Jerusalem, Israel
    Posts
    708
    Thanks
    0
    Thanked 1 Time in 1 Post

    run command button from code (xp/2k)

    I know this has been discussed- How do in code from Form1; open form2 and run a commandbutton2 on form2?
    Thanks

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: run command button from code (xp/2k)

    It doesn't really make sense to do it that way. A better approach would be to have a public sub on Form2 that is called from the command button on Form2 and can also be called in code from Form1. The routine MUST be public or it cannot be seen from outside Form2. With a public routine, it is a method of the form, so you can call it like this:

    Forms!Form2.SomeMethod()
    Charlotte

  3. #3
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Jerusalem, Israel
    Posts
    708
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: run command button from code (xp/2k)

    Thanks for the idea.

Posting Permissions

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