Results 1 to 5 of 5
  1. #1
    crowegreg is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Posts
    398

    Controls within form


    Is their anyway to use a variable to reference a control on a form. As an example, to change the property of visible to false for Check0, I'd use the code me.Check0.visible = false. How could I insert a variable in for the number 0 and make the property change?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Try

    Me("Check" & VariableName).Visible
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    crowegreg is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Posts
    398
    I've been fighting with this for 2 hours. You solved it in 10 minutes. Thank you!! This is the first time I've posted to this forum. How do I indicate it's been solved?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Click the Thread Tools dropdown on the bar just above the first post and see if the choice is there.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Happy to help; I've gone ahead and marked it solved for you.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Change controls on an empty form
    By Dom in forum Forms
    Replies: 2
    Last Post: 01-19-2011, 08:36 AM
  2. Auto populating Form controls
    By eww in forum Forms
    Replies: 1
    Last Post: 08-09-2010, 12:49 PM
  3. form controls & recordset
    By slow&steady in forum Forms
    Replies: 2
    Last Post: 06-25-2010, 02:49 PM
  4. Accessing form controls
    By dante in forum Forms
    Replies: 15
    Last Post: 07-28-2009, 08:26 AM
  5. Adding Controls to a Form
    By msmayhew in forum Programming
    Replies: 7
    Last Post: 12-14-2005, 03:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums