SubDatasheet collapse?

B

Barry Gilbert

I have a subform (set to datasheet view) that has a subdatasheet based
on another subform. I'm looking for code to collapse the subdatasheet.
I've seen a posting that refers to acCmdSubdatasheetCollapseAll, but I
don't see that constant in RunCommand (using Access 2K). I've also
tried using DoMenuItem, but subdatasheets didn't exist in Access 97, so
the menu option is not exposed through DoMenuItem's menu constants. The
command exists in Access, under Format>Subdatasheet, but I cannot seem
to get to it through VBA. Even SendKeys, which I usually avoid like the
plague, is squirrely because of weird timing issues.

Any ideas or suggestions would be greatly appreciated.

Barry
 
J

John Vinson

I have a subform (set to datasheet view) that has a subdatasheet based
on another subform. I'm looking for code to collapse the subdatasheet.
I've seen a posting that refers to acCmdSubdatasheetCollapseAll, but I
don't see that constant in RunCommand (using Access 2K). I've also
tried using DoMenuItem, but subdatasheets didn't exist in Access 97, so
the menu option is not exposed through DoMenuItem's menu constants. The
command exists in Access, under Format>Subdatasheet, but I cannot seem
to get to it through VBA. Even SendKeys, which I usually avoid like the
plague, is squirrely because of weird timing issues.

Any ideas or suggestions would be greatly appreciated.

Barry

I don't know how to do this, because I very rarely use datasheet view.
It's of VERY limited utility and subject to all sorts of hassles.

I'd use correlated continuous subforms instead.

John W. Vinson[MVP]
 

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