hiding column headings

F

FubarDave

I am making a subform from a query. Is there any way that I can suppress or
hide the coumn headings.
 
A

Albert D. Kallal

FubarDave said:
I am making a subform from a query. Is there any way that I can suppress or
hide the coumn headings.

Use an continues form in place of a datasheet view.....
 
F

FubarDave

Thanks for the reply. I had thought of using a form view but to be honest I
use the database view as it makes it easier to hide entire columns within the
code so that it only displays the next 5 years worth of data. Is there no
other way ?
 
J

John W. Vinson

Thanks for the reply. I had thought of using a form view but to be honest I
use the database view as it makes it easier to hide entire columns within the
code so that it only displays the next 5 years worth of data. Is there no
other way ?

A form based on a Query can display whatever fields, and whatever records, you
wish. It's MUCH easier and more flexible than a table datasheet.

And if you have a different *field* for each year, you need to consider
normalizing your table structure.
 
F

FubarDave

John,

thanks for your comments. What do you mean by normalising the table
structure. Do you mean column headings like Year1, Year2, ...... instead of
2009, 2010 ...
 
J

John W. Vinson

John,

thanks for your comments. What do you mean by normalising the table
structure. Do you mean column headings like Year1, Year2, ...... instead of
2009, 2010 ...

No. I mean using TWO TABLES in a one-to-many relationship. The second table
would have fields like

DetailID <primary Key>
LinkID <foreign key to your main table>
ItemYear <Integer, e.g. 2007, 2008, 2009>
DataForThatYear

Rather than ten fields in your table for data for ten years, you would have
ten *RECORDS* in this table, one record for each year.

"Fields are expensive, records are cheap". Storing data - either a year
number, or a proxy for a year number - in a fieldname is reasonable in a
spreadsheet, but NOT in a relational table. Data should be stored *in fields*,
not in fieldnames! It's easy to create a Crosstab query to *display* the tall
thin table in a wide-flat form.
 
Top