John W. Colby
jwcolby at colbyconsulting.com
Wed Mar 10 05:37:29 CST 2004
Jurgen, Great ideas. I've been looking at clickable header sort dir methods for awhile. One question, how do you determine that a lists data source has changed? This one has always bugged me since Access has nothing built in to tell the developer that the data in a table has changed, and certainly not for data changes from workstation to workstation. John W. Colby www.ColbyConsulting.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Jürgen Welz Sent: Wednesday, March 10, 2004 1:34 AM To: accessd at databaseadvisors.com Subject: RE: [AccessD] Your favorite control behavior Getting back to my favorite control behavior: I like list boxes to have a clickable heading that toggles sort direction over each column in the list. For multi select list boxes, I like to have label buttons at the bottom for selecting All, None or Inverting the selection. I build these as subforms receiving property settings from the parent form as to the number of columns, the column widths and the rowsource. These subform lists resize themselves to the size of the subform allotted them on the parent form. The clickable sort/select buttons are always labels that appear depressed on mouse down and raised on mouse up. I also move a small graphic arrow indicating the sort direction and which column is currently sorted on top of the label clicked on. Using a label to receive the click prevents focus from moving from the list or the parent form. I change the itemdata property of the graphic to indicate the sort direction. The concept looks a lot like the sorting in Outlook and some versions of windows explorer and the users immediately grasp the significance. As I don't like to requery to fill these lists by direction, I always like to use arrays as a rowsource and only requery when the list data has changed. (It has always been my contention that I'd rather run a line of code than retrieve a bit over a LAN as the code executes faster than bits can travel). I have been using disconnected data wherever possible, even in Access 97, and sorting arrays rather than retrieving recordsets sorted one way and then another and this approach has nearly always been applied to my sortable lists. Ciao Jürgen Welz Edmonton, Alberta jwelz at hotmail.com _________________________________________________________________ MSN Premium includes powerful parental controls and get 2 months FREE* http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=htt p://hotmail.com/enca&HL=Market_MSNIS_Taglines -- _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com