Drew Wutka
DWUTKA at Marlow.com
Mon Mar 9 14:58:52 CDT 2009
Ok William, I put a really quick and dirty...and I mean REALLY quick and dirty example together: http://www.marlow.com/menu.zip It uses two classes, MenuItems (the collection class) and MenuItem. MenuItems builds the menus, an AllItem collection gets a list of all the menu items, and then there is a collection for favorites, recent items, and a mix of favorites and recent. If you want to 'age check' the favorites, it would be a simple criteria in the WHERE statement for the timestamp field. I rarely build Access interfaces, and most of the ones I've built only have a handful of forms or reports. So I just put in 5 forms and 5 reports, with 3 macros. None of them have or do anything, other then display what they are. But when you click on an item in the menu, it runs that item by using the MenuItem class and it's Execute method. The execute method runs the menu item, and also records who ran it and when it was run (for the recent items list). The recent items list only grabs the last 10 items (TOP 10, distinctrow (so you don't get duplicate items) ordered descending). The fav/recent group only puts the last 5 most recent into the mix. Like I said though, this was down and dirty. The menu doesn't update automatically, you have to close and open it. It wouldn't be too hard to make it update automatically though, I just don't have the time to code that. With a treeview, you can count, add and remove nodes (and their children). So from a coding aspect, it would simply be a matter of after executing the item, to run a check, that determines the count of the recent/favorites and adding any items (and removing ones that go over the limits you want). Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Hindman Sent: Monday, March 09, 2009 12:59 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] ...building, managing, and using a page favorites list Drew ...that's closer to what I'm looking for ...not an MRU per se but TopX unioned w/a favorites table possibly ...however I'd also want to age the TopX to ensure the user wasn't seeing year old data. ...I do use a highly modified switchboard table to drive a treeview menu that is always visible ...I was thinking of adding an outlook type accordion below the treeview for personalized favorites ...was hoping someone had already done something similar ...looks like I'm going to have to build this from scratch. William The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited.