Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2009
    Posts
    89

    Unanswered: Changing ColumnHidden property on a split form?

    HI. I've got a split form with a few hidden fields. I want to create a tick box that when ticked, unhides the fields (as opposed to right clicking the column headers, clicking "unhide", and then ticking the column to unhide).

    So far I have:
    Code:
    If Not Me.Check_ContractEnd.Value = 0 Then
            Me.ContractEndDate.Properties("ColumnHidden") = True
        Else
            Me.ContractEndDate.Properties("ColumnHidden") = False
        End If
        
        'Me.Repaint
        Me.Requery
    This doesn't give any errors (and when I print out the values of ColumnHidden they are correct). BUt the dataasheet part of the split form never shows the column. It seems the columnhidden property is only read when the form is loaded.

    How would I tell it to redraw the dataasheet half? I've tried Me.Repaint adn Me.Requery but they don't work.

    Any help is appreciated.

  2. #2
    Join Date
    Mar 2009
    Location
    Dorset
    Posts
    119
    When is this code running? I assume it's on the afterupdate of the tickbox?
    Regards
    JD

    Software-Matters

  3. #3
    Join Date
    Jun 2009
    Posts
    89
    well the tick box isn't bound to anything so I'm actually running this on the "on click" event (so i know that the code is being run).

    I know the column hidden property is being applied becuase when it is enabeld, I canot select the column ( i can select every other column). So the property is being set, i just need the program to actually apply the properties again.

Posting Permissions

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