Results 1 to 5 of 5

Thread: hide column

  1. #1
    Join Date
    May 2009
    Posts
    72

    Unanswered: hide column

    Hello everybody

    I have a form with a subform.

    on the sub form I have the following fields

    RMNO --- COMBOBOX
    RMFORM---LOOKUP TEXT FIELD
    RMBOREDIA--TEXT FIELD

    WHEN I SELECT A VALUE FROM RMNO, THE RMFORM ALSO GETS POPULATED

    WHAT I WANT IT IS

    Private Sub RMNO_AfterUpdate()
    If Me.RMFORM.value = "ROUND BAR" Then
    Me.Controls("RMBOREDIA").ColumnHidden = True
    End If
    End Sub

    BUT ITS NOT WORKING FOR ME

    PLEASE HELP

    THANKS IN ADVANCE
    HEMANTH

  2. #2
    Join Date
    Mar 2009
    Location
    Dorset
    Posts
    119
    Try

    Me!RMBOREDIA.ColumnHidden = True
    Regards
    JD

    Software-Matters

  3. #3
    Join Date
    Mar 2009
    Posts
    5,441
    Provided Answers: 14
    ColumnHidden only works with forms in Datasheet view. To hide a control in any other viewmode use:
    Code:
    Me.Controls("ControlName").Visible = False
    or:
    Code:
    Me!ControlName.Visible = False
    Have a nice day!

  4. #4
    Join Date
    May 2009
    Posts
    72

    hide column

    Thank You SoftwareMatters and Sinndho for your reply

    both of the code is not working

    the sub form is in datasheet view

    Please help

    Regards
    Hemanth

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    dunno much about datasheets, possibly Im too much of a control freak to let users play with such things (well there's that and the fact you can't do anything programatically with the be things, and alos ho easy it is to make changes and not realise)

    But if you want to use datahseets then what you could do is create a query which only exposes the columns you want
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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