Solved

Trying to hide columns in subform datasheet

Posted on 2011-02-11
16
578 Views
Last Modified: 2012-05-11
I downloaded a Microsoft Template Access DB for Task Management:
http://office.microsoft.com/en-us/templates/task-management-database-TC001225356.aspx

I did it just to learn more about forms and subforms.

Now, I have a question.  I created a new query that added three fields (PastDue, DueToday, and DueThisWeek).  With that query as the record source, I created three forms (used as subforms) that each filter for one of those three criteria.  I then have a main form that has these three as subforms.  

 Main Form
But since I copied and pasted one of the default views, [Open Tasks], and did the same for the subforms, the subform has a lot of fields that I don't wish to show in the subforms.  I could delete them from the forms I assume, but I'm wondering why just checking the visible property on those fields to "No" doesn't work.

 Visible set to No doesn't work
0
Comment
Question by:BBlu
  • 5
  • 4
  • 3
  • +3
16 Comments
 
LVL 75

Assisted Solution

by:DatabaseMX (Joe Anderson - Access MVP)
DatabaseMX (Joe Anderson - Access MVP) earned 85 total points
Comment Utility
You have to use the Column Hidden property in a datasheet ... example:

Private Sub Form_Load()
    With Me
        .Text5.ColumnHidden = True
        .txtEmpName.ColumnHidden = True
        ' and so on ....
    End With
End Sub

mx
0
 

Author Comment

by:BBlu
Comment Utility
oh, okay.  And that is not a property in the property sheet, right?  I have to use VBA if I don't want to take it out of the original query and form?
0
 
LVL 77

Assisted Solution

by:peter57r
peter57r earned 25 total points
Comment Utility
Or you can just push the column edges together to hide the columns.
0
 
LVL 29

Expert Comment

by:Badotz
Comment Utility
Oh for goodness' sake - just delete the columns. Why make something trivial so complicated?
0
 
LVL 84

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 50 total points
Comment Utility
<Why make something trivial so complicated?>

The author is asking WHY, not necessarily how. As they stated, they could simply delete the columns, but they were curious as to why it didn't work. Don't you agree that, as a developer, being curious is a good thing :) ?

<I could delete them from the forms I assume, but I'm wondering why just checking the visible property on those fields to "No" doesn't work.>

Datasheet view is a specialized view of an Access form, so many standard properties don't apply. However, the Datasheet form also has many properties that are ONLY applicible to that view. If you review the Properties for a Datasheet form, you'll see many items which are ONLY relevant to that view.
0
 
LVL 29

Assisted Solution

by:Badotz
Badotz earned 20 total points
Comment Utility
>>Don't you agree that, as a developer, being curious is a good thing

Of course I do. But I have to do my own investigation first, and if I simply cannot grok something, then I seek advice from Google, my library (of books) and EE and other sites. I never throw up my hands after a single bash at something.
0
 

Author Comment

by:BBlu
Comment Utility

Why so judgmental, Badotz.  I'm actually a VP of Finance with a nerdy developer side.  I did google and I have tried to research.  I've always had success on EE and thought, as if often the case, that I was beating my head against the wall on something that might be easy that I'm overlooking.  No need to be harsh.  I'm just trying to learn here, man.
0
 
LVL 119

Assisted Solution

by:Rey Obrero
Rey Obrero earned 70 total points
Comment Utility
BBlu,
just right click on the column and select hide columns

for multiple columns to hide, hold the shift while highlighting all the columns you want to hide

to unhide, right click on the title bar of the form and select unhide columns
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 119

Expert Comment

by:Rey Obrero
Comment Utility
you can also use the Format > hide columns for this purposes
0
 

Author Comment

by:BBlu
Comment Utility
Thanks, Capricorn.  It just turned out that I couldn't do it at the source level. I can hide them when the main form is in Form view, but setting the field view property to 'no' in design view of the subforms wasn't working.  And I was just trying to figure out why.  Thanks to everyone.
0
 
LVL 29

Expert Comment

by:Badotz
Comment Utility
Huh? I never mentioned any names - which in my case usually means I'm the subject ;-)
0
 
LVL 119

Assisted Solution

by:Rey Obrero
Rey Obrero earned 70 total points
Comment Utility
in a2003, setting the visible property to Yes, hides the columm. but not in A2007
0
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Access MVP) earned 85 total points
Comment Utility
@BBlu:

Not matter which method you use, no matter how you slice and dice it, short of deleting the columns ... if hidden and the user fools around enough with the mouse, the columns can be unhidden.

mx
0
 

Author Comment

by:BBlu
Comment Utility
Sorry, Badotz.  I guess I took it personally.  A finance guy like myself can get pretty intimidated- or at least extremely impressed- inside this forum.  I continue to learn and grow from you all.  You all have a great rest of your weekend.
0
 

Author Closing Comment

by:BBlu
Comment Utility
Thanks to all of you
0
 
LVL 29

Expert Comment

by:Badotz
Comment Utility
No worries.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now