To order Alpha Four or Alpha Five, click above to go directly to Alpha, or call 800.451.1018 or 781.229.4500
|
|
|
|
|
|
Sunday, September 1, 2002
|
|
VOLUME 1
ISSUE 7
|
|
|
|
|  |
 |
 |
Query by Form - a Great Tool for the User
by Bill Warner
Query by Form
Query by Form might just be the handiest tool available for the user. And I don't mean just power users -- virtually anybody can use it. How can I be so confident? I've included it with every app I've ever sold, and I have found that just about every customer has used it.
I think the beauty of QBF lies in the fact that it can be used very simply (thereby making it useful to beginners), and yet it has nearly as much power at a scripted query developed by an expert. As an example, I have one customer that creates complex queries using multiple fields (to make .AND. conditions) along with several pages (to make .OR. conditions) along with multi-field sorts.
While QBF can be very useful, the default use can also cause problems or confusion with an inexperienced user. This is because it uses the same form as the data-entry form from which it is run, and this is a disadvantage because:
| 1. |
Any buttons that are on the data-entry form will also appear when running the QBF. This means that, if a button is clicked, it will try to run the attached script as if it had been pressed from the data-entry form. This can result in some very unexpected actions. |
| 2. |
If the data-entry form has an embedded browse, it will also show on the QBF form. While this won't cause a problem as such, the browse won't be available to the user, which could cause some confusion. |
| 3. |
The user might be in QBF, but forget where they are, and try to do some data entry. This can also cause unusual results. |
Therefore, I always design a special form just for QBF. This isn't nearly as difficult as it might seem -- in fact, it's extremely simple.
After I finish designing my data-entry form (SALES, for example), I click on Save As, and call it Q_SALES. Then I remove any buttons, the embedded browse, and change the title of the form. If my main form is titled SALES (with large black letters on a light background), I'll make the title in the QBF form SALES QUERY, and use large white letters on a dark background. This way, it makes it very obvious when the user is in QBF. (In some cases, I even make the background color of the form different.)
The final step is to 'tell' my data-entry form that it should use a different form. This is simple, too. In the form's edit mode, in Form Properties, Form, there is a box for the Query Form. If you have already designed the form, it will appear when you click on the down arrow at the right end of the box.
Used this way, Query by Form can be an extremely powerful tool for the user. While it won't do everything that a scripted query can do,1 it can give the user just about any query they could ever want.
1 In QBF, you can actually create a query expression that is identical to the syntax you would use in a scripted query, and I have helped several customers create complex queries this way. However, this is something that is beyond the capabilities of most users.
[PRINTER FRIENDLY VERSION]
|
|
| |