[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Trying to hide columns in subform datasheet

Posted on 2011-02-11
16
Medium Priority
?
589 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 - 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
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

834 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