Results 1 to 3 of 3
  1. #1
    cksm4 is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2010
    Posts
    24

    Hiding a Column in Split Form

    Hello,

    I am unable to get a column to hide in split form view. I have tried ColumnHidden, Visible, and ColumnWidth with no response. Any ideas?

    Private Sub CboShowMe_AfterUpdate()



    If Me.CboShowMe = "Current Employees" Then
    Me.Status.ColumnHidden = True
    Me.RecordSource = "QryEmployeesExtended"
    DoCmd.ApplyFilter , "isNull(TerminationDate)"
    End If

    If Me.CboShowMe = "Former Employees" Then
    Me.Status.ColumnHidden = True
    Me.RecordSource = "QryEmployeesExtended"
    DoCmd.ApplyFilter , "Not IsNull(TerminationDate)"
    End If

    If Me.CboShowMe = "Unfilled Positions" Then
    Me.Status.ColumnHidden = False
    Me.RecordSource = "QryOpenPositions"
    End If

  2. #2
    cksm4 is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2010
    Posts
    24
    Figured it out... in a split form you have to set the focus on the datasheet. I then used the column width as a work around:

    Private Sub CboShowMe_AfterUpdate()

    If Me.CboShowMe = "Current Employees" Then
    RecordSource = "QryEmployeesExtended"
    DoCmd.ApplyFilter , "isNull(TerminationDate)"
    Screen.ActiveDatasheet.Status.ColumnWidth = 0
    End If

    If Me.CboShowMe = "Former Employees" Then
    RecordSource = "QryEmployeesExtended"
    DoCmd.ApplyFilter , "Not IsNull(TerminationDate)"
    Screen.ActiveDatasheet.Status.ColumnWidth = 0
    End If

    If Me.CboShowMe = "Unfilled Positions" Then
    RecordSource = "QryOpenPositions"
    Screen.ActiveDatasheet.Status.ColumnHidden = False
    Screen.ActiveDatasheet.Status.ColumnWidth = Me.Status.ColumnWidth
    End If
    End Sub

  3. #3
    Join Date
    Mar 2013
    Posts
    8
    Sorry to revive an old thread, but how did you "set the focus on the datasheet?"

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

Similar Threads

  1. Hiding columns in split form.
    By cementblocks in forum Forms
    Replies: 5
    Last Post: 03-11-2014, 07:16 AM
  2. How to change the column heading in a "split form"
    By robertrobert905 in forum Forms
    Replies: 1
    Last Post: 09-21-2010, 02:42 PM
  3. Split Form not working correctly
    By Brian62 in forum Access
    Replies: 29
    Last Post: 02-16-2010, 05:43 PM
  4. Split Form Sync up
    By jonsuns7 in forum Forms
    Replies: 1
    Last Post: 11-10-2009, 02:56 PM
  5. split a column into two seperate columns
    By nybanshee in forum Access
    Replies: 2
    Last Post: 08-14-2008, 04:52 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