Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3008
  • Last Modified:

modify access table custom group property

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
Yaniv Schiff
Asked:
Yaniv Schiff
  • 5
  • 2
  • 2
  • +1
1 Solution
 
conagramanCommented:
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
 
Jeffrey CoachmanCommented:
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
 
Yaniv SchiffDirector of Digital Forensics Author Commented:
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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
Jeffrey CoachmanCommented:
Ah, OK,  thanks for the clarification.

I'll let you continue with conagraman

JeffCoachman
0
 
conagramanCommented:
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
 
Yaniv SchiffDirector of Digital Forensics Author Commented:
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
 
conagramanCommented:
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
 
conagramanCommented:
here is the database
NavGroups.accdb
0
 
conagramanCommented:
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
 
Patrick MatthewsCommented:
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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 5
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now