Results 1 to 4 of 4
  1. #1
    Snufflz is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2011
    Location
    Wirral, UK
    Posts
    2

    Making subform field visible/invisible

    Hi,



    I have a form for the input of staff member's salary increases. On the main form I have a list box for a member of staff to be selected. As the salary details are stored in a separate table to the name details, the main form has two subforms, one for data input and one to list the salary history for the member of staff selected.

    When the main form is opened, before a name is selected from the list box, the salary of the first member of staff is displayed on the subforms.

    As soon as a staff member is selected, the subforms update and show the correct data.

    My question is this:

    Is it possible for the subforms to be blank until a name is selected from the list box or:

    Is it possible for the Salary_before_update field be invisible on the subform until a name is selected from the main form list box.

    I have experimented with setProperty/visible on the subform but that returns an error when the main form is loaded.

    I would very much appreciate any help with this.

    Thank you.

  2. #2
    maximus's Avatar
    maximus is offline Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Aug 2009
    Location
    India
    Posts
    931
    I have a subform Table4 in my main form and I want the visible property of a control on the subform C to change with the value selected in a combobox Col1 in the main form. When you select Yes in Col1 the control (TextBox) C is visible and invisible when u select No in the subform.

    Code as below.

    If Me.Col1 = "Yes" Then
    Form.Table4!C.Visible = True
    Else
    Form.Table4!C.Visible = False
    End If

  3. #3
    Snufflz is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2011
    Location
    Wirral, UK
    Posts
    2

    Thank you

    That is most kind of you. Since I posted the thread I have worked it out myself but I am very grateful for your help.

    Regards.



    Quote Originally Posted by maximus View Post
    I have a subform Table4 in my main form and I want the visible property of a control on the subform C to change with the value selected in a combobox Col1 in the main form. When you select Yes in Col1 the control (TextBox) C is visible and invisible when u select No in the subform.

    Code as below.

    If Me.Col1 = "Yes" Then
    Form.Table4!C.Visible = True
    Else
    Form.Table4!C.Visible = False
    End If

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Quote Originally Posted by Snufflz View Post
    That is most kind of you. Since I posted the thread I have worked it out myself but I am very grateful for your help.

    Regards.
    Maybe you would like to use the Thread tools and mark this thread as Solved then.

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

Similar Threads

  1. Replies: 2
    Last Post: 01-06-2011, 04:38 AM
  2. Invisible/visible box
    By teirrah1995 in forum Forms
    Replies: 4
    Last Post: 10-03-2010, 02:45 AM
  3. Setting fields visible/invisible
    By col5473 in forum Forms
    Replies: 1
    Last Post: 09-17-2010, 09:14 AM
  4. Combo Boxes Visible/Invisible
    By Rick West in forum Forms
    Replies: 2
    Last Post: 07-06-2010, 09:41 AM
  5. Making objects visible in a report
    By Lockrin in forum Reports
    Replies: 3
    Last Post: 04-12-2010, 07:06 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