Solved

modify access table custom group property

Posted on 2010-09-13
12
2,758 Views
Last Modified: 2013-11-27
in Access 2007 there is the ability to add objects to custom created groups, for easy navigation. If i already have the groups created (say "group1", "group2", etc...) how do i go about setting this property for individual tables through vba?
0
Comment
Question by:Forensicon
  • 5
  • 2
  • 2
  • +1
12 Comments
 
LVL 10

Expert Comment

by:conagraman
Comment Utility
it looks like there are a couple of ways to do this.  first here is the link to the msdn website that talks about customizing the navigation panel.
http://office.microsoft.com/en-us/access-help/view-and-manage-objects-by-using-the-navigation-pane-HA001213879.aspx#BM6

here is what it says about adding objects to a custom group


option 1:     <<"To add or move objects in the database into a custom group, click the drop-down arrow at the top of the Navigation Pane, and then click the custom group that you created.
    * Under Unassigned Objects, right-click the object that you want to add or move.
    * Click Add to group on the shortcut menu, and then click the custom group that you want to add the object to.">>


Option 2:
<<"Copy and paste objects

    * In the Navigation Pane, right-click the object that you want to copy, and then click Copy.
    * Right-click the group in the Navigation Pane where you want to paste the object, and then click Paste. You can also paste the object in the Navigation Pane of another database that is open in Office Access 2007.">>

hope this helps
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
Comment Utility
IMHO, it would be easier to put these items in a menu.

Remember, users should only be interacting with application through forms.
They should not really have access to the navigation Pane or any "Groups"

Just my 2c

;-)

JeffCoachman
0
 

Author Comment

by:Forensicon
Comment Utility
Thanks for the replies, i am hoping to do this through VBA. This is more of a database template that get's copied down from the network and new tables get created in it, so manually adding the tables to the user groups is not really an option.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
Comment Utility
Ah, OK,  thanks for the clarification.

I'll let you continue with conagraman

JeffCoachman
0
 
LVL 10

Expert Comment

by:conagraman
Comment Utility
ok forensicon

what i have been able to come up with is that there is no built in command for what you want to do.
however there is a way other than the UI.

 this is going to take some playing around with on your part but you can change the system tables.
****************** warning! you can mess up your database doing this **********

below is a sample database to play around with
choose your table choose your category then press group.  
*** i dont know why but after you press the group key close the form and press your  F5 (refresh key) then go back into your form
- its going to take some work on your part but this should get you in the right direction.

hope this helps

test.accdb
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

Author Comment

by:Forensicon
Comment Utility
Sorry, haven't looked at this in a while. I'm not really sure what to do with this though. Let me clarify what i'm looking for i guess. I have a database template get copied down for different cases we work on. There are no tables in the db to begin with. There are a bunch of vba scripts included in it. These scripts get run and tables get created automatically. I want these tables to get their "group" property automatically assigned when they get created. Does this make sense?
0
 
LVL 10

Expert Comment

by:conagraman
Comment Utility
Forensicon


i have made a database and worked with this idea a little more.

*first off the more i think about this i would suggest just making a table of all the newly created tables.
i kept going with this because i was interested in it as well
i have included a database with the code and it is noted for further information.

when you open the database up and press the button what is happening is it
1: creates a new table
2: adds a new record to the system table "MSysNavPaneGrouptoObjects" with the needed data

the only thing is i can’t get the navigation pane to refresh correctly. after the code is finished running the table will have been grouped but you may have to press F5 and close/reopen the form to see the effect. there may be a command to refresh the navigation pane but i have not found it yet.

hope this is what you wanted
0
 
LVL 10

Accepted Solution

by:
conagraman earned 500 total points
Comment Utility
here is the database
NavGroups.accdb
0
 
LVL 10

Expert Comment

by:conagraman
Comment Utility
I have provided the logic and a sample database.
Once a new table is created the system tables have to be modified.
I believe this question has been answered sufficiently.
0
 
LVL 92

Expert Comment

by:Patrick Matthews
Comment Utility
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now