Results 1 to 3 of 3
  1. #1
    AmanKaur123 is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jan 2017
    Posts
    47

    VBA code to change the control visibility in a form from a function

    Hi All

    Hi All

    The form name is stored in a variable FName which is a global variable. How can I use this variable to make the control visible/invisible in the form from a function stored in a module.

    so basically something like:

    Code:
    FName.AgentTick.visible=true
    where AgentTick is a control on the form whose name is stored in FName.

    Thanks

  2. #2
    jwhite is offline Competent Performer
    Windows 10 Access 2013 32bit
    Join Date
    Dec 2012
    Location
    North Carolina
    Posts
    349
    Try: Forms(VariableHoldingYourFormName).AgentTick.Visible =True

  3. #3
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Forms!FName!AgentTick.Visible=True

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

Similar Threads

  1. Control visibility on continuous form
    By GraeagleBill in forum Forms
    Replies: 4
    Last Post: 12-26-2014, 05:33 PM
  2. Tag visibility using for loop on control
    By Ruegen in forum Programming
    Replies: 3
    Last Post: 11-13-2014, 04:08 PM
  3. Replies: 1
    Last Post: 10-28-2014, 06:36 AM
  4. Replies: 2
    Last Post: 10-03-2014, 10:07 AM
  5. Replies: 3
    Last Post: 09-08-2011, 10:53 AM

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