After you hide a field in a datasheet, you can redisplay the hidden field using a shortcut menu.

Skip to main content

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

  • Article
  • 03/30/2022
  • 2 minutes to read

In this article

Use the ColumnHidden property to show or hide a specified column in Datasheet view. Read/write Boolean.

Syntax

expression.ColumnHidden

expression A variable that represents a ToggleButton object.

Remarks

For example, you might want to hide a CustomerAddress field that's too wide so that you can view the CustomerName and PhoneNumber fields.

The ColumnHidden property applies to all fields in Datasheet view and to form controls when the form is in Datasheet view.

Hiding a column with the ColumnHidden property in Datasheet view doesn't hide fields from the same column in Form view. Similarly, setting a control's Visible property to False in Form view doesn't hide the corresponding column in Datasheet view.

Note

To set or change this property for a table or query by using Visual Basic, you must use a column's Properties collection. For more information about using the Properties collection, see Properties.

You can display a field in a query even though the column for the field is hidden in table Datasheet view. Use values from a hidden column as the criteria for a filter even though the column remains hidden after the filter is applied.

Setting a field's ColumnWidth property to 0, or resizing the field to a zero width in Datasheet view, causes Microsoft Access to set the corresponding ColumnHidden property to True. Unhiding a column restores the ColumnWidth property to the value it had before the field was hidden.

The ColumnHidden property is not available in Design view.

Example

The following example hides the ProductID field in Datasheet view of the Products form.

Forms!Products!ProductID.ColumnHidden = -1

The next example hides the ProductID field in Datasheet view of the Products table.

Public Sub SetColumnHidden() 
 
 Dim dbs As DAO.Database 
 Dim fld As DAO.Field 
 Dim prp As DAO.Property 
 Const conErrPropertyNotFound = 3270 
 
 ' Turn off error trapping. 
 On Error Resume Next 
 
 Set dbs = CurrentDb 
 
 ' Set field property. 
 Set fld = dbs.TableDefs!Products.Fields!ProductID 
 fld.Properties("ColumnHidden") = True 
 
 ' Error may have occurred when value was set. 
 If Err.Number <> 0 Then 
 If Err.Number <> conErrPropertyNotFound Then 
 On Error GoTo 0 
 MsgBox "Couldn't set property 'ColumnHidden' " & _ 
 "on field '" & fld.Name & "'", vbCritical 
 Else 
 On Error GoTo 0 
 Set prp = fld.CreateProperty("ColumnHidden", dbLong, True) 
 fld.Properties.Append prp 
 End If 
 End If 
 
 Set prp = Nothing 
 Set fld = Nothing 
 Set dbs = Nothing 
 
End Sub

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.


Additional resources

Additional resources

In this article

Asked by MegaCrane533

QUESTION 16

After you hide a field in a datasheet, you can redisplay the hidden field using a shortcut menu.

 True

 False

QUESTION 17

You can freeze one or more fields in a datasheet so they remain visible at all times.

 True

 False

QUESTION 18

You can select a particular form, such as a Navigation form, to display when Access starts.

 True

 False

QUESTION 19

The Performance Analyzer recommends how you can improve database performance.

 True

 False

QUESTION 20

After you freeze a field in a query datasheet, you must run the query again before you can unfreeze the field.

 True

 False

Answer & Explanation

Solved by verified expert

Answered by brahmashakeela

, ultrices

facilisis. Pellentesque

rem ipsum

ac, dictum vitae odio.

ipsum dolo

facilisis. Pellentesque

molestie

facilisis. Pellentesque

ipsum dolo

itur laoreet. Nam risus ante,

Unlock full access to Course Hero

Explore over 16 million step-by-step answers from our library

Subscribe to view answer

Step-by-step explanation

, ultrices

  • fficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam r

ipsum dolor

  • s a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lo

usce dui l

  • s a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pel

itur laoree

  • a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectet

et, consect

  • ctum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pu

What happens if you hide the bonus column in the employees table in table datasheet view?

What happens if you hide the Bonus column in the Employees table in Table Datasheet view? The Bonus column no longer appears in the datasheet, but is still part of the Employees table. Sorting a table datasheet temporarily displays only those records that match given criteria.

What happens if you delete a field from a table that contains data?

You can delete a field from a query or from a table in Access. When you delete a field from a query, the field remains in the database, but is no longer used in the query. When you delete a field from a table, the field is deleted from the entire database.

Which short text field property should you use to indicate users must enter a value in the field?

Select the field that you want to require always has a value. In the Field Properties pane, on the General tab, set the Required property to Yes.

What are you doing when you enter data into a sub data sheet quizlet?

What are you doing when you enter data into a subdatasheet? You are entering records in the related table.