Expanding a multi-level subdatasheet form using VBA

G

Guest

I have a form containing a multi-level datasheet in Access 2002. The main
form has a subform, and that subform also contains a subform ... 3 levels.
Since all forms are configured to display as datasheets the result is a
heirarchical subdatasheet displaying the 3 levels

I'd like to be able to expand or collaspe BOTH subdatasheet LEVELS for a
SINGLE record using code (VBA). In other words, on some event I would like
to expand (or collaspe) the level 2 AND level 3 subdatasheets for the current
record on level 1.

The the form's property of SubdatasheetExpanded expands the subdatasheet for
ALL records (not what I want). ((This also seems to cause some interesting
memory/resource related problems with Access sometimes casuing it to crash!))

The Ctrl+Shift+Down and Ctrl+Shift+Up keyins work fine on the main form to
expand/collapse a single record. Once the 2nd level form has focus the keyins
also to expand/collaspe the 3rd level. However I could not get this to work
using the SendKeys VBA function in code.

Does anyone know how to do this using VBA??

Any help would be appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top