Is there a way to open a table (using a button on a form) with only certain columns visible ?
Thank you.
MIchael
Hide table columns
-
- Administrator
- Posts: 78658
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Hide table columns
I'd never open a table directly, but create a form based on the table, and open that. In a form, you get to decide which fields are displayed and which ones aren't.
Best wishes,
Hans
Hans
-
- 4StarLounger
- Posts: 579
- Joined: 10 Feb 2010, 17:32
Re: Hide table columns
The users actual work out of the tables directly (long story - but it is OK that they do that)
Their issue is, the tables have 50+ columns, and they need to use about 10 of them. So they wind up "hiding" the columns they don't need.
They use these tables all day - I have 100s of databases that this occurs in,
They want to be able to open the table (s) with just the fields they need.
I actually have 100's of tables like this. These tables are used for research.
Michael
Their issue is, the tables have 50+ columns, and they need to use about 10 of them. So they wind up "hiding" the columns they don't need.
They use these tables all day - I have 100s of databases that this occurs in,
They want to be able to open the table (s) with just the fields they need.
I actually have 100's of tables like this. These tables are used for research.
Michael
-
- NewLounger
- Posts: 5
- Joined: 19 Mar 2014, 19:35
Re: Hide table columns
You could set-up queries with the correct columns included and then attach the query to the button.
-
- Administrator
- Posts: 78658
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Hide table columns
The problem is that hiding columns in a table counts as a design change. In general, it is not a good idea to let end users apply design changes.
In a datasheet form, you can show/hide columns dynamically - controls on a form have a property ColumnHidden that determines whether the field they're bound to is displayed in DataSheet view.
In a datasheet form, you can show/hide columns dynamically - controls on a form have a property ColumnHidden that determines whether the field they're bound to is displayed in DataSheet view.
Best wishes,
Hans
Hans
-
- 4StarLounger
- Posts: 579
- Joined: 10 Feb 2010, 17:32
Re: Hide table columns
Of course !Dashiell wrote:You could set-up queries with the correct columns included and then attach the query to the button.
Thanks Dashiell.
-
- 4StarLounger
- Posts: 579
- Joined: 10 Feb 2010, 17:32
Re: Hide table columns
I know, but it is how the process is set up.HansV wrote:The problem is that hiding columns in a table counts as a design change. In general, it is not a good idea to let end users apply design changes.
In a datasheet form, you can show/hide columns dynamically - controls on a form have a property ColumnHidden that determines whether the field they're bound to is displayed in DataSheet view.
I will look into the ColumnHidden property.
What I will want to set up eventually, is to have a list box displaying the tablenames in the database and allowing the user to select the table
and open THAT table with specific columns hidden.
That's later though.
Thanks HansV!
-
- Administrator
- Posts: 78658
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Hide table columns
See what you think of the attached sample database. If you allow macros, it should display a form on which you can select a table, then select fields from that table, and open a form with just those fields.
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans
Hans
-
- 4StarLounger
- Posts: 579
- Joined: 10 Feb 2010, 17:32
Re: Hide table columns
That is unbelievable ! How in the heck do you do it?
Not just brilliant, but quick - you are just a miracle.
Thank you HansV - of course exactly what we needed !!
Thank you so much !!
MIchael
Not just brilliant, but quick - you are just a miracle.
Thank you HansV - of course exactly what we needed !!
Thank you so much !!
MIchael