Full Version: How Do I Collapse A Subdatasheet In Access 2010?
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
jennizona
I'm not even sure how to intelligently ask this question but I will try my best. I am using Access 2010. I have a form in Datasheet view with a subform also in Datasheet view. The maindatasheet initially shows up with the little plus sign next to each row. When you click on it the subdatasheet displays below the record. So far so good. The problem is that the subdatasheet contains sensitive customer information and I would like for the subdatasheet to collapse after a specific amount of time (essentially the same as clicking on the minus sign). What is the best way to handle this aside from relying on the end user to hit the minus sign?

Thank you.
RCJT
You could try to use the On Timer Event to periodically close those Windows.

You likely could use On Time also as you open up the subForm. After it opens, you can set a period of time, when that time is over, the window could close.

You may also consider something where the details window pops up, they can read it, then if they move their mouse off the small form, it could automatically close.
mike60smart
Hi

welcome2UA.gif

What you need to do is NOT show the small Plus Sign at all

Go to the Design View of your table
Right Click and select Properties
In the Subdatasheet Name Row which is set to [Auto] - change this to None

Do this for all your tables
jennizona
My subdatasheet is based on a query that has 2 tables in it. My tables are all linked via an ODBC connection to a SQL backend so I am unable to pull up the properties on them.

I have decided to create an OpenForm and CloseWindow embedded macro for the MouseDown and MouseUp Events so being able to eliminate the plus sign would be necessary. Any other way to eliminate them?
jennizona
I actually solved the problem by hiding and unhiding the columns using the MouseDown and MouseUP events.

Me.ColumnName.ColumnHidden = False
RCJT
Nice, thanks!

JT
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.