We help IT Professionals succeed at work.

How to control attributes of form in Datasheet view

wsturdev asked
I have a form I want to display as a sub form on a parent.  Things like font size, column widths and row heights seem to have minds of their own!  How do I control those attributes of the sub form in datasheet view.  Also, is there any way to not show the column headers?
Watch Question

Top Expert 2006

There is a menu bar that controls datasheet formatting. Depending on your version of access, it can be found under view/toolbars, or under the Format menu option.
As far as I know, there is no way to rid yourself of the datasheet column headings. You can fake it by using continuous forms modified to appear like a datasheet view, but that doesn't sound like what you're after.
MIS Liason
Most Valuable Expert 2012

You can control the Fontsize and Row Height through VBA as well.
Use code similar to this:
Private Sub Form_Open(Cancel As Integer)
   Me.DatasheetFontHeight = 14
   Me.RowHeight = 225
End sub

Hope this helps as well


As far as the column headers I don't believe you can hide as jeffwiley said. If you open the subform in a new window and in design view you should be able to set the font properties for the cells. Also if you make changes there to row height and width it should reflect opn the main form.

boag2000 got me on the right track.  I'm using 2007 and found the following steps took care of the issue for me.  After opening the subform in design view, I opened the Property Sheet.  Under the Event tab, I created an Event Procedure, selecting the Code Builder option.  On the left was a list of Properties in which I found what I was looking for, DatasheetFontName, DatasheetFontHeight, RowHeight, etc.  

The part I don't understand is the blank Sub that is created.  Maybe my approach isn't the most efficient, but I was able to set the font like I wanted.  Hope this helps.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.