Expand only the subdatasheets you want

Today's guest blogger is Pavlo Pedan of ARGO Business Corp. He has 15 years of experience with Access and has a great site of tips  at http://sites.google.com/site/msaccesscode/.

If you have a form that contains subdatasheets, you can use the following VBA command to expand all of them:

Forms![FormName]![SubFormName].Form.SubdatasheetExpanded = True

However, we often want only some of the subdatasheets to be expanded, based on
some criteria (for example - expand only if subdatasheets contain data.)

Watch a short video demo and download a demo database from this page. Make sure you have added a reference to the "Accessibility" library (%windir%\system32\oleacc.dll).

This has been tested on Access 2007.

Send your Power Tips to Mike and Chris at accpower@microsoft.com.

Office Blogs Comments

Comments: (1) Collapse

  • I clicked on the link and it shows a video titled rainbow list that does not have sound. I looked at other material from Pavlo and personally ... I didn't thing it was that clear and well done. Sorry.

Comments

Comments: (loading) Collapse