?
Solved

Trying to hide columns in subform datasheet

Posted on 2011-02-11
16
Medium Priority
?
587 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 340 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 100 total points
ID: 34877449
Or you can just push the column edges together to hide the columns.
0
10 Questions to Ask when Buying Backup Software

Choosing the right backup solution for your organization can be a daunting task. To make the selection process easier, ask solution providers these 10 key questions.

 
LVL 29

Expert Comment

by:Badotz
ID: 34877914
Oh for goodness' sake - just delete the columns. Why make something trivial so complicated?
0
 
LVL 85

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 200 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 80 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 280 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 280 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 340 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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.
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Suggested Courses

777 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