Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SubDataSheet problem

1 view
Skip to first unread message

this"@sezampro.yu mire

unread,
Aug 3, 1999, 3:00:00 AM8/3/99
to
As you probably know, one of the new things in Access 2000 is a
Subdatasheet, a grid that shows up when you click on a plus mark next to
each record of the table that is in 1-1 or 1-many relationship with
table(s). The examples of the pictures taken can be found at
http://www.geocities.com/SouthBeach/Palms/9151/ac_slike.zip and now please
look at picture 1.jpg

Picture one shows a price list. So, there are groups of products, products
themselves and packages of the products. The relation is
Groups->Products->Packages. The picture shows packages of the second product
in the first group that showed up when the user clicked a plus mark.

The problem can be seen in picture 2.jpg when going to the new group (group
no. 3) the packages of the second product of this group are visible even
though the user didn't open them by clicking on the plus mark. I think that
the best thing would be to remember the state of each datasheet or to
collapse all when going to another group.

I can solve the problem by using the Format->SubDataSheet->Collapse All
command as it is seen on picture 2.jpg but I need to call that method in
OnCurrent event of the form so that the user doesn't have to wonder through
the menus while he is working with the database. I tried first with
DoCmd.DoMenuItem method but it doesn't include this command that is he has
the commands that are valid all until Access 97 but not this one that is new
to Access 2000. The A2k help recomends using the RunCommand method but in
the list of acCmd constants Ididn't find this one (Collapse All) that I
need. The constants are showed just that, with no explanation so I can only
guess about what is constant is for (some are self explanatory others are
not). I tried all that I thought were interesting but I didn't find the
constant for the Collapse All command.

Does anybody know how can I solve this problem using Access methods as soon
as possible ?

It comes to my mind to solve this prb through the Windows Api by getting the
handle of the Access window and the Collapse All command but I don't know
how to do this even though I think I do it if I had a piece of Win Api code
that does this.

If anyone can help please do so.

0 new messages