Solved

modify access table custom group property

Posted on 2010-09-13
12
2,819 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
ID: 33667615
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
ID: 33669137
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
ID: 33672387
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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 33672745
Ah, OK,  thanks for the clarification.

I'll let you continue with conagraman

JeffCoachman
0
 
LVL 10

Expert Comment

by:conagraman
ID: 33676454
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
 

Author Comment

by:Forensicon
ID: 33863540
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
ID: 33885254
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
ID: 33885280
here is the database
NavGroups.accdb
0
 
LVL 10

Expert Comment

by:conagraman
ID: 34083792
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
ID: 34840096
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

813 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

16 Experts available now in Live!

Get 1:1 Help Now