Results 1 to 4 of 4

Thread: Which is best?

  1. #1
    Join Date
    Dec 2002
    Posts
    60

    Unanswered: Which is best?

    I have two forms open. I want to refer to an object on form1 through code in form2.

    I know of two ways to do this:

    1) strValue=Forms!form1!txtbox1
    2) strValue=Form_form1.txtbox1

    Which way is best (most efficient, technically correct, etc)? Or is there another way?

    What is the difference between the two methods?

    Thanks,
    bc301

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    The second method should be

    Forms("Form1").txtbox1

  3. #3
    Join Date
    Dec 2002
    Posts
    60
    I was aware of Forms("form1").txtbox1 and just considered it a variation of Forms!form1!txtbox1.

    I did type the second method (Form_form1.txtbox1) correctly. It works in my code.

    Thanks.

  4. #4
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Sorry I havent heared about that form before Form_form1.txtbox1

Posting Permissions

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