Tony Toews has posted a neat little utility that grabs the control widths and a few other details for all the controls on your forms to help you make sure that you've sized things consistently throughtout your application. This will be especially useful when you expand a field and have to change all the controls it's used in.
Monday, November 2, 2009
Sunday, November 1, 2009
A Ribbon Class - Another approach to using the new ribbon in your applications
Much has been written about the new "Office Fluent User Interface" that has been introduced with Office 2007. Also known as the ribbon, it's a whole new way to work with Access, Word, Excel and Powerpoint, replacing the menus and command bars we've all become accustomed to.
Like them or not as a user, Access developers have to deal with the reality that the custom command bars they have been using in their applications the past don't work the way they used to.
In this article Albert Kallal presents a neat approach to solving the problem of having your application interact with the ribbon. He's created a ribbon class which uses methods similar to the old command bar methods to operate on icons within the ribbon. I haven't tried using it in an application yet, but I ran the demo and it looks pretty neat.
See also: my other ribbon posts.
Posted by
Stephen
at
6:00 AM | Permalink
| Add This!
| Blog This |
0
comments
Labels: Access2007, ribbon
Tuesday, September 8, 2009
What is the Fastest Way to Return the Record Count of a Table?
Roger Carlson has posted an interesting analysis of the various ways to get the record count of a table. Take a look here.
Posted by
Stephen
at
11:27 AM | Permalink
| Add This!
| Blog This |
0
comments
Treeview Example- Filling Recursively, Populating With Names of Folders
Here's another working Treeview example from the code archive at UtterAccess.
Quote: This little database illustrates the implementation of Microsoft Knowledge Base Article Q20981 (How to Fill a Treeview Control Recursively). In addition, frmFolderExamples illustrates one way to fill the Treeview Control with the names of the folders located on a drive. It also shows how to return some of the properties of the treeview nodes as well as how to clear a treeview. I use some code harvested from Candace Tripp’s Browse and Open Files Database as well as ideas from Luiz Cláudio’s Treeview Control for Database Objects.
Posted by
Stephen
at
10:02 AM | Permalink
| Add This!
| Blog This |
0
comments
Labels: forms, Treeview, working example
Roll-Your-Own “Traffic Light” Icon Set
Quote: Here’s a great tip suggested by Clint Covington. Using an expression and a Rich Text text box, you can create a traffic light indicator in an Access form or report, as in the following illustrations:
I really like this use of a Rich Text text box. We used it in my shop successfully- I think it was the first Access 2007 specific feature we used. (Rich Text text boxes became part of Access in the 2007 version, I think.) Take a look at http://blogs.msdn.com/access/archive/2009/04/16/roll-your-own-traffic-light-icon-set.aspx
This solution gives more options for colouring controls on your forms and reports than conditional formatting does.
Posted by
Stephen
at
9:06 AM | Permalink
| Add This!
| Blog This |
0
comments
Labels: forms, HTML, rich formatted text
Friday, September 4, 2009
Using Right-Click With Treeview Nodes
Lets say you have a treeview and you want a user to be able to right-click a node and then be able to either delete it, copy it, or view details about it. How do you trap the right-click event? How do you show a context menu? And how do you know what node was clicked?
There's no OnRightClick event for Treeviews- that would have been the easiest solution. There are MouseUp and MouseDown events that know what mouse button was pushed- maybe that would help.
It turns out the secret is MouseUp.
Sunday, April 12, 2009
Programming The VBA Editor
Programming The VBA Editor describes methods for programmatically interacting with the VBE editor. Quote:"You can use these features to write custom procedures that create, change, or delete VBA modules and code procedures." The article is written for Excel but I think it should be adaptable to Access. (I haven't tried it yet- if you try it let me know how it works!)
Posted by
Stephen
at
6:00 AM | Permalink
| Add This!
| Blog This |
1 comments
Labels: vba



