Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2003
    Posts
    15

    Unanswered: hiding a column in datasheet view - help!!

    If I have a column in a datasheet that I want hidden depending on whether someone has entered a password on another screen how would I go about it?
    If it can't be hidden even just to make the data in it invisible.

  2. #2
    Join Date
    Oct 2003
    Location
    Roanoke, Va
    Posts
    445

    Smile Re: hiding a column in datasheet view - help!!

    Originally posted by BigMrC
    If I have a column in a datasheet that I want hidden depending on whether someone has entered a password on another screen how would I go about it?
    If it can't be hidden even just to make the data in it invisible.

    An example from the Help files:

    You can use the ColumnWidth property to specify the width of a column in Datasheet view. Read/write Integer.

    expression.ColumnWidth

    expression Required. An expression that returns one of the objects in the Applies To list.

    Setting
    You can set this property by dragging the right border of the column selector or by clicking Column Width on the Format menu in Datasheet view and entering the desired value. When you set the ColumnWidth property by using the ColumnWidth command, the value is expressed in points.

    In Visual Basic, the ColumnWidth property setting is an Integer value that represents the column width in twips. You can specify a width or use one of the following predefined settings.

    Setting Description
    0 Hides the column.
    1 (Default) Sizes the column to the default width.


    Forms![Customers].RowHeight = 450
    Forms![Customers]![Address].ColumnWidth = -2

    Gregg

  3. #3
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    What do you mean by "datasheet"? Is this a grid of some sort? A continuous form?

  4. #4
    Join Date
    Oct 2003
    Location
    US
    Posts
    343

    Re: hiding a column in datasheet view - help!!

    You can also use the following code in your subform Open event:

    If <user permissions good> then
    me.controlname.columnhidden=False
    else
    me.controlname.columnhidden=False
    endif


    Originally posted by BigMrC
    If I have a column in a datasheet that I want hidden depending on whether someone has entered a password on another screen how would I go about it?
    If it can't be hidden even just to make the data in it invisible.

Posting Permissions

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