PDA

View Full Version : access2007 - Navigation Pane - via code



L@ja
01-25-2011, 09:00 AM
Hello Dear All,

I would like to re-link my linked tables in my access2007 accdb.
I can, but if I did it, then I loss the structure which table where are in Navigation pane groups... so all tbl are moved to "ungrouped group".
(it's maybe ok, because i delete the linked tbl and creating new linked tbl)

my question: how can I read- via code -
which object(tbl) where are in the nav-pane?

-or
Which group containing which tbl?

thanking you and your help.

L@ja
01-26-2011, 10:49 AM
Hello,
I found the followings:
some systables has the requested data:
MSysNavPaneGroupCategories-->navpane views
MSysNavPaneGroups --> navpane groups

but I cant understand/disassembly my root question's answer:

Which group containing which tbl?

can anybody help me?
10x

gcomyn
01-27-2011, 12:05 PM
Ok... this is new to me, so I may not be entirely correct, but this is what I found while looking around:

In table MSysNavPaneGroupCategories, You can add different GroupCategories, so you could have multiple ways to group your objects.

So, in table MSysNavPaneGroups, GroupCategoryID is the [id] field from MSysNavPaneGroupCategories that you want to look at. Default for Custom is id=3

In the MSysNavPaneGroupToObjects, the GroupID field links to the ID field in MSysNavPaneGroups and the ObjectID links to the ID in MSysObjects.

Here is the query that I worked up to get the list of NavigationPane Groups...

SELECT MSysNavPaneGroupCategories.Name, MSysNavPaneGroups.Name, MSysObjects.Name
FROM (MSysNavPaneGroupToObjects INNER JOIN (MSysNavPaneGroups INNER JOIN MSysNavPaneGroupCategories ON MSysNavPaneGroups.GroupCategoryID = MSysNavPaneGroupCategories.Id) ON MSysNavPaneGroupToObjects.GroupID = MSysNavPaneGroups.Id) INNER JOIN MSysObjects ON MSysNavPaneGroupToObjects.ObjectID = MSysObjects.Id
WHERE (((MSysNavPaneGroupCategories.Id)=3))
ORDER BY MSysNavPaneGroupCategories.Position, MSysNavPaneGroups.Position, MSysNavPaneGroupToObjects.Position;

This is the first time I've looked at the Navigation pane, so I might have missed some things, but this looks like the navigation pane to me, so it works.

GComyn
:sleuth:

L@ja
01-28-2011, 09:33 AM
Hi,
thank you your time!

I'm also found this query -similar :)

but the next problem for me,
how can I correctly manage the re-linking...

so my planned method:
read info's for connected tabledefs with our query (put variables,eg view-name,groupname,pos...etc)
then delete the tabledef,
and re-create(addnew) with new connectionstring...

here so ok,
but how can I put the right navpane groupname and position??
hm... in this query can't modify anything...(readonly?)

if I write it manually to table-s, my db navpane will hidden...
maybe crashed the nav-pane-logic...?

so be carefull who playing these.

could anybody help me?

best regards