Solved

Trying to hide columns in subform datasheet

Posted on 2011-02-11
16
584 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 3
  • +3
16 Comments
 
LVL 75

Assisted Solution

by:DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 85 total points
ID: 34877381
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
ID: 34877393
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
ID: 34877449
Or you can just push the column edges together to hide the columns.
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 29

Expert Comment

by:Badotz
ID: 34877914
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
ID: 34878139
<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
ID: 34879087
>>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
ID: 34879387

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 120

Assisted Solution

by:Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1) earned 70 total points
ID: 34879402
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
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 34879415
you can also use the Format > hide columns for this purposes
0
 

Author Comment

by:BBlu
ID: 34879563
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
ID: 34879568
Huh? I never mentioned any names - which in my case usually means I'm the subject ;-)
0
 
LVL 120

Assisted Solution

by:Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1) earned 70 total points
ID: 34879686
in a2003, setting the visible property to Yes, hides the columm. but not in A2007
0
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 85 total points
ID: 34879784
@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
ID: 34881068
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
ID: 34881089
Thanks to all of you
0
 
LVL 29

Expert Comment

by:Badotz
ID: 34881479
No worries.
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
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…

734 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