Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Mar 2001
    Location
    Colorado, USA
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Referencing Form Controls in Code (Access 2000)

    I seem to have suffered a memory dump.

    I need to reference a control on another form using the syntax Forms!FormName!ControlName. The catch is that the form name is contained in a string variable. How can I write the reference to look at the desired control on the form listed in the variable?

    Thanks.

  2. #2
    2 Star Lounger
    Join Date
    Mar 2001
    Location
    Colorado, USA
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Referencing Form Controls in Code (Access 2000)

    Never mind, I was able to revive the unconcious brain cell and remembered that it's

    Forms(strFormNameVariable)!ControlName

    Thanks anyway.

  3. #3
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Referencing Form Controls in Code (Access 2000)

    Ah, it's the altitude up here - it gives me sometimers all the time! <img src=/S/dizzy.gif border=0 alt=dizzy width=15 height=15> <img src=/S/confused.gif border=0 alt=confused width=15 height=20>
    Wendell

Posting Permissions

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