Preferences
Settings Tab 1
Help Style offers your choice of Local or Internet-based help. "Local help file" selects a Help application called
accelf.chm, which is copied into your System or System32 directory upon installing Access ELF. Choosing "Internet-based help" selects the documentation portion of the ELF Software Web site.
Query corner snap determines the position of the query window; offset is useful for allowing access to scrollbars of underlying windows.
Worksheet Graph determines whether the Worksheet opens in full-graph or split graph mode when you type questions that request graphs, with Worksheet response style selected.
The AutoImport Phrases option is designed to assist users of pre-4.0 versions of Access ELF migrate their applications to the format of the current release. Its effect is to allow the automatic transfer of ELF Phrase tables from a user's application (.mdb) into the Custom.mdb file now associated with each View of a database. It can also be used to help distribute the same Phrase list (or the shared part of a Phrase list) to the different Custom.mdb files belonging to various Views of the same database.
Express Unattended is a switch for suppressing all warnings and dialog boxes that may appear during an Express Analysis. The idea is to minimize the required interaction (once a user clicks the Express button). This lets developers provide simple "one-click" instructions for regenerating predefined Views to users of their redistributed applications.
Express Unattended is a switch for suppressing all warnings and dialog boxes that may appear during an Express Analysis. The idea is to minimize the required interaction (once a user clicks the Express button). This lets developers provide simple "one-click" instructions for regenerating predefined Views to users of their redistributed applications.
The decision whether to use or ignore existing analysis tables can be made in advance by setting the Use Prior Analysis checkbox, which becomes active whenever "Express Unattended" is checked.
The Permit Rewording checkbox is new in version 4.0, and enables a built-in error handler which attempts to find alternate ways of interpreting the user's question. This feature may or may not be appropriate for your application. It's probably best suited for those situations where users have very little familiarity with the database and its contents, and would have less patience for the kind of "Sorry, please try again" message that can result from incorrectly-phrased questions.
For development purposes, the Warn on Rewording checkbox lets you instruct the system to provide feedback on exactly when this special feature is invoked. This lets you scrutinize more carefully the responses and/or SQL translations which are generated as a result of these "rewordings". (Note that warning message boxes describing the rewording of the original question will not appear unless the "Warn on Rewording" checkbox and the "Show Warnings" checkbox (located on the Advanced tab of Settings) are BOTH checked.
Log Queries sets the Query History feature running. It can also be turned ON and OFF from the "power" button on the Query History form.
Log Unique Queries Only causes the software to check for duplicates before logging queries.
The AutoBrowse checkbox controls the behavior of the Lookup button on the
Lexicon Lookup window. To use the Lookup function, a word (or phrase) must first be typed into the drop-down box above the Lookup button. Clicking the Lookup button then displays any known definitions of the word. If the AutoBrowse checkbox is set ON, some additional lookups may be performed in cases where the original word has defined synonyms. In effect, the entire lexicon will be scanned for other words which share the same synonym, and these will be listed in the Browse panel.
Since the Worksheet window can also be used to type in queries, the Close Query Window on Opening Worksheet option does exactly what it says.
The Apply Spell Check box controls whether or not unknown words will be intercepted by either built-in or custom error handlers. When this box is cleared, there is no error handling. For instance, "List the supliers" will present a message box: Unfamiliar word(s) supliers. Checking this box enables the Access ELF Spelling window to appear, giving the user a chance to correct any mis-typings. In this case, clicking "supplier" and then the Change button fixes the error and allows the translation to proceed normally.
In addition to the built-in Spelling (spellcheck) window, another method of intercepting questions containing words not understood by the system is by applying a Spellcheck script. The Scripted Spell Check check box indicates whether some script in the script library should be used either in place of, or in addition to, the normal spellcheck window. Checking this box will have no effect unless the name of a valid script is first entered into the grey box immediately below the "Scripted Spell Check" checkbox.
Because of the complexity of working with scripts, we've provided the Debug Scripts option as an easy way to trace the values of all variables on entry and exit from scripts attached to ELF processes.
If you select the Custom reply style, the Form Style buttons become active. This allows you the
same degree of flexibility in designing your forms that the Form Wizard permits.
Note that for these options to work properly, the Access Wizards must be available as libraries.
If the Wizards are not installed (or become uninstalled), you'll need to rerun the Microsoft Access
installation, choosing Advanced Wizards to recover this capability.
You can also select the "Transparent Fields" option, which greys out text fields unless the cursor is moved into that field; whereupon the field background becomes white.
The Graph Reply style lets you can request a graph without working it into the wording of your
question. Instead of asking "Graph the number of customers from each country." you can simply
click Graph, and ask "How many customers are there in each country?"
The automatic graphs will resize themselves as their windows are resized, and can be sorted or limited to the "top N" by using controls on the form footer. You can also enter your own filter, referring to the graph label as "L" or the graph value as "V". Two examples are given, one restricting the labels to those starting with alphabetic characters (L >= "A" and L <= "Z"), and one enforcing positive graph values (V > 0). The first is actually written: L Like "[A-Z]*", which demonstrates how you can use patterns for filters. If you want to eliminates all but labels which start with the letters A-C, you can type: L Like "[!A-C]*"
There are currently three distinct styles of graph supported, Pinnacle, Microsoft Graph 5, and Microsoft Graph 6. Each behaves in a different way, and has different strengths and weaknesses. All three styles allow you to display the graph full-screen. For Pinnacle and Graph 6, click the lower-left X to hide the controls, then maximize the window. For Graph 5, right-click the graph and maximize.
A Microsoft Graph 5-style graph can be completely customized using in-place activation. To do this, double-click the graph. This hides the Access ELF toolbar and changes all menu items to Microsoft Graph options. To return to normal Microsoft Access mode, press escape or click any of the controls below the graph.
Unfortunately, in-place activation appears to work very spottily with Access XP. Using the Graph toolbar to change graph styles, font sizes etc. may work correctly -- but many of the menu items seem to lock the system. Use the Escape key to return to the Access environment. .
The Pinnacle and Microsoft Graph 6-style graphs have drop-down combo-boxes style selectors. In addition, Microsoft 6 graphs can be rotated using either the "trackball" control, or using Ctrl+mouse combination. Label font sizes and styles can be changed by clicking on the label while holding down the shift key.
Tip 1: When changing to the pie-chart style on the Microsoft graph, you may need to switch
from By Row to By Column view.
Tip 2: To graph crosstab queries, resulting from queries such as "Compare the average subtotal for each employee and category.", use the Pinnacle or MS Graph 6 styles. (Include [Order Subtotals] for this example.) Starting with v3.0, you can trigger crosstab queries without the "compare" keyword, by specifying the down and/or across label. For instance, "Give me the total quantities, showing month of order date down and employee name across."
With crosstab graphs, you can also filter on the Legend, by entering a filter expression such
as [A-D]*. If the legend were salesperson last name, this would restrict the crosstab graph to
showing only those with last names between A and D. (This Legend filter control might not appear
at first in the form footer; it may be beyond the right margin. Expand the graph form
horizontally to expose this control.)
The Best Guess option provides flexibility for those kinds of data which do not appear to best
advantage in the datasheet format. For example, databases that contain photographs or charts
(as OLE objects) present these with their OLE class name in datasheet mode, rather than the
picture or graph you'd probably prefer. On the other hand, most queries do not involve OLE
objects, so it's usually faster and just as complete to use the datasheet mode. Since you don't
want to have to keep deciding which to sacrifice, speed or full display capability, we provide
the Best Guess option. This option automatically detects the presence of an OLE object in the
query response, and presents these responses in Autoform mode; all others are provided in the
quicker Datasheet mode.
Version 2.0 introduced two new response styles, Worksheet style and user-defined (or "My
Reply Styles"). In their own way, both of these represent huge advances in the state of the
art of database query.
The user-defined form style lets you use nearly any Microsoft Access form as a display
vehicle for your query. Of course, the query should have something to do with the fields
displayed by the form. But the fields don't need to be individually named or otherwise selected.
Access ELF will take care of all the details of reading the source fields for the controls on
your form (and that includes calculated controls). It will create a query which uses the
conditions you specify in the question, plus all the fields required by the form, and
package them into one neat SQL statement (as usual, possibly relying on earlier SQL statements
which it will also create).
For example, if we type show the German companies using form Suppliers
as a question, using the Northwind database, the response looks like this:
(See Web site for expanded Help application including graphic images.)
If instead we type show the German companies using form Customers,
the response looks like this:
(See Web site for expanded Help application including graphic images.)
The reason we need to say "nearly" any form, is that there are still some cases we can't handle.
Forms which include subforms that have secondary record sources are still off limits. Another
obvious limitation is that Access ELF must be aware of the record source used by the form; that
is, it must have been included in the Analysis when building the interface. An easy way to
tell whether the form's record source is recognized is to select it from the drop-down box in
the My Reply Styles section. If the form's record source isn't recognized, Access ELF will
warn you with an error message.
However, forms are built and changed all the time, so this feature is meant to work "on-the-fly",
reading the current forms and their definitions. Because these attributes are not predefined as
part of the query interface (and because the names of forms are very often composed of words
which are used in other contexts) Access ELF may not immediately recognize that you are
requesting a given form, even if you use the "using form X" syntax. Alternatively, you can
check the Use As Active Form checkbox after selecting the form you want to activate. Another
method is to move the Form into the Favorites list (using the Add Favorite button). Once a
form is defined as a Favorite, you can give it a unique alias. For example, we can choose
the Customer Phone List form, add it to the Favorites list, switch to favorites view and add
an alias "CustPhones" for the form.
Now it's a snap to open the form using the new alias. We just enter
show the German companies using form CustPhones:
Yes, everything still works as designed on this form, including the selector buttons!
You can also use the query box to set the active form, or reset the response style back to
the regular mode. For instance, Show the German companies, making form CustPhones
active will both trigger the CustPhones response style and make it the Active
Form. So now you can simply type Show the French companies If you next
enter show the French companies, making form CustPhones inactive, of course
it will have the opposite effect, deselecting user-defined mode and returning the response as
a simple datasheet (assuming you are in Datasheet mode). Finally, you can also enter instructions
such as Make form CustPhones active. or Make form CustPhones inactive.
The status line will echo the command for verification, eg. [Active form set to CustPhones.]
There isn't currently a lot of variation permitted in the way you express these commands.
Most currently available syntax is expressed in the following list (vertical bar indicates
alternates, braces indicate optional word):
Set|Use form X
Set|Make form X active
Set X as {the} active form
Make X {the} active form
Set|Make form X inactive
Clear {the} active form
Here are some "did you know"s about the Worksheet:
Did you know . . .
That you can double click on any LEFT, RIGHT or INNER join expression in the SQL window to cycle through the choices? (Also true in the SQL Translation window.)
That you can activate hierarchies (tree displays), for instance for an organizational chart, just by using the Verb Mapper tab to connect the two fields defining the hierarchy?
That you can split the display into grid and graph by using the option buttons, then size each half of the display by dragging the "sizer" button to the right or left?
That if you right click on a hierarchy button, you can split the grid into a grid+tree display (so you can have grid/tree & graph all going at once).
That you can double-click on any field to "drill-down" -- this runs a new query that shows the associated records. For instance, you might want to drill down from the COUNTRY field to get a breakdown by STATE. To do this, use the Verb Mapper to associate COUNTRY with STATE, using the Verb "DRILL".
That you can export any section of the worksheet to Excel; just highlight the rows and columns you want (use the shift key while clicking).
The Worksheet style response is a large topic unto itself. Please see the
Worksheet help page for complete details.
Views
Settings Tab 3
The Views tab shows all of the interfaces (Views) currently defined for the active database. You can load a View by clicking on its name in the Available Views listing.
You can create more than one view for any database. In fact, it's highly recommended that you pick a small subset of tables for each view. Think of it like this: you wouldn't try to represent your entire business in a single spreadsheet; same goes for natural language views. Break down your database into logical sections and create a view for each one.
You can run any number of Analyses, using a different set of tables, queries and startup options, giving each one a unique name. These can be as specific as you like; for instance, only using information from a small set of tables.
Now, how do you decide which view to use?
Starting with version 3.0, you can actually set up the system to decide which view to use depending on the question typed in. You can write a program in VBScript (or JScript) which selects the view based on the question, the user (or the time of day, or anything else you can program!). Click Help from the Scripts Tab for more information on Scripting.
You can also let the user choose the view from the Views tab (as in prior versions) or you can write "hooks" to the various views into your application. For instance, from some point in your app (like the OnLoad event of a given form), you can trigger the loading of the required View with a single line:
result=elfOpenView("MyViewName")
(where MyViewName is the name of the predefined view).
Dim CurrentView As String
Dim result as Integer
CurrentView="MyView"
result=elfOpenView(CurrentView)
Either "MyView" or "MyView.ELF" is acceptable as a parameter to the function. You don't need to specify the location; the current setting of the Search In box is used. In the unlikely event that you're switching between Views located in different physical locations (a practice which isn't recommended) you can programatically change the setting of the Search In box by using the Subroutine elfSetDirectoryPath(PathSpec). For example,
elfSetDirectoryPath "f:\\apps\interfaces"
result=elfOpenView("MyOtherView")
The value returned by the elfOpenView() function is True if the interface was loaded successfully, otherwise False.
You can also do this same thing from within Question scripts, to reset the View depending on the user and/or his question. From scripts, the two functions work exactly the same, but are called SetDirectoryPath and OpenView respectively (not "elfSetDirectoryPath" and "elfOpenView").
Before leaving this topic, let's review why the ability to define Views is so important. Possibly the most serious mistake to fall into when defining an ELF interface is to throw "everything but the kitchen sink" into the definition. (We may encourage this by providing the Express Analysis option which does just that.) But remember that the more database structures you include in a given interface, the higher the probability of conflicts between different uses of the same word. Now of course, if any expected query is going to require data from a number of different tables, all at the same time, then it's necessary to include them all in a given view.
Before version 3.0, you had no way of knowing whether the user would be asking questions about products, say, or customers, or shipments, at a given point in the program. You had no choice but to to include them all in one heaping mass of interface. This is no longer true. With the advent of scripting, you (or more to the point, your script!) can get access to the user's question and decide right then and there what's the topic of conversation. Since you also know who's asking the question (just consult the UserID variable) you can tailor scripts that reach a hitherto unknown level of customizability.
The Views tab also contains an option box which allows you to switch between Jet 3 (Access 97), Jet 4 (Access 2000) and SQL Server 7.0 dialects. The system will automatically select the one appropriate for your database. However, it's nice to have the option to get a translation into another dialect, just by clicking a button. In some cases the same SQL will be generated; more often, the SQL generated is specific to the system selected. You'll only get interesting error messages by trying to pass SQL Server SQL to Microsoft Access. If you use this feature to get "foreign" SQL translations, be sure to uncheck the "Pass through" box on the Query window, so that SQL is generated but not processed.
The Views tab shows all of the interfaces (Views) currently defined for the active database. You can load a View just by clicking on its name in the Available Views listing.
Verb Mapper
Settings Tab 4
The Verb Mapper allows you to associate an action word with the relationship between two tables (or between a table and an Analyzed query). For example, we can associate the verb "handle" with the link between Employees and Orders. It's as easy as typing the word handle into the box between the two tables, so that it reads across "Employees handle (s) Orders". If the relationship should read in the other direction, use the Flip button to invert. You can, if it makes sense, define separate verbs for the relationship in each direction.
The relationships don't have to be direct table-to-table (or table-to-query). You can define relationships between datasets that have indirect relationships. To add a new Verb Mapping, click the New Record indicator (arrow star) on navigation control, or just keep advancing to the next record until the "Define A Relationship to Associate with a Verb" dialog box appears. You can then select a table from Column A and one from Column B, for instance Customers and Products. Rather than displaying the keys, as it does for direct joins, the join boxes will display the tables used to link the two data sets; in this case Orders and Order Details. Now we can define the following: Customers enjoy(s) Products and (after clicking the "Flip" button) Products satisfy(s) Customers.
After making these definitions, Access ELF will understand questions such as "Who enjoys Gumbo Mix?" and "What satisfies Handel?" (you guessed it: Gumbo Mix!)
You can display hierarchies in the Worksheet by using the Verb Mapper to let ELF know about hierarchical relationships -- such as organizational structure (who bosses who) or parts-dependencies. To do this, add an entry to the Verb Mapper by using the Add New record button (arrow and star). Choose the same table on both sides of the relationship. Click a field on the left, for instance [Employee ID], and a field on the right, for instance, [Reports To]. Now you can use the Hierarchy buttons in the worksheet to get a tree display. Or use "as a hierarchy" in your question, to display records in hierarchical order.
Tip: Be careful when using this function to click on actual key values, not -- by accident -- other numeric fields. This instructs ELF to ignore these fields when creating graphs; and deleting the reference later won't restore "graphability."
Another use for the Verb Mapper is for linking fields which you want to display togather. Let's say that every time you display the "Document" field, you want to also display "Case ID". Add a Verb Map entry using the verb "IMPLY". The two fields can come from the same, or from different tables. Now, whenever you see Document in the response, Case ID will be there too.
(Note: if the two tables are related, Access ELF will fill in the relationship in the place where you want to select the fields to relate. To override, just type in the verb IMPLY, then double-click one of the fields pre-selected by the program. This will unlock the list of fields in each table so that you can click one on each side.)
You can also use this feature to relate two fields using the special verb "drill". This defines a drill-down relationship; which means if you double-click in the Worksheet on a data item from one field, Access ELF will run a query showing related values from the other field. Typical would be to relate COUNTRY to STATE by "drill' so that double-clicking on "USA" would break down the displayed values state-by-state.
The Synchronize Lexicon button scans through your database, checking for any vocabulary that's been added since the last analysis performed. If you've added a new record for "Bob Smith", Access ELF needs to know, so that it can handle questions like "What's Bob Smith's phone number?" Of course, if your database is small enough, running a complete analysis from scratch is no problem, especially if you've saved any configuration choices with the Save button on the Custom Analysis window. But with larger databases, you may be able to save some time by just re-synching the one or two most volatile tables, instead of re-analyzing the whole database.
The MDB, Table and Field buttons on the Table/Field Source window launched by the Synchronize button offer three different "bite-sizes" for re-synching ELF's lexicon with your current database contents. Note that you can also use this sync feature to "un-exclude" a given field's data from the lexicon. That is, if the Mem (Memorization of vocabulary) box was checked off during a Custom Analysis, but you've changed your mind and now want to include all the text from this field, use Field Synchronization and answer Yes during the override dialog.
Remember that can also define specific error messsages to show in response to particular words or phrases in the question. Do this by preceding a lexical phrase definition with an exclamation point. For instance, you can pop-up a message that says "We don't allow profanity here" if the user types in a word on your list of undesirables. The header for the column in which this message will appear can be defined in the phrase definition itself (following a semi-colon).
When I Type: !hell
I Really Mean: We don't allow profanity here;Stern Rebuke to User
If you don't specify a header within the error text, then whatever appears in the Default Custom Error message header" textbox will be used. And if no message is supplied, the header will read "We regret to say:" (We're sure you can do better than that!)
In fact, this has a more serious purpose than the example might indicate. This feature should prove very helpful in guiding the questioner away from topics which aren't covered by your database or View, and steer them back toward the kinds of information you do make available. And of course, as we describe thoughout the documentation, scripts have even more power to tailor these custom messages. For instance, you could write a Phrase script that fires when "hell" is detected, but examines the rest of the query to see whether it's in regard to "Cajun Hell Pepper Sauce". For more on this, see Answer Scripts.
Scripts
Settings Tab 6
The final tab (not shown) is where scripts used by all of Access ELF's scripted components must be saved. (Sorry, we're still using old screenshots!) You can also use the
script window to edit you scripts in-place, although this is somewhat clumsy. Slightly better is using the Zoom box (Shift-F2) to give yourself more working room for script editing. We generally prefer to tinker with scripts in a text editor such as Notepad, then cut-and-paste into the Scripts panels when ready to use (or test) them.
There are 5 types of scripts that can be used in Access ELF. To summarize, there are:
Analysis scripts which automate any post-analysis customizations required.
Question scripts which intercept the input (or question) from the user.
Answer scripts which intercept the SQL generated by the interface.
Phrase scripts which intercept the question ONLY IF the specified phrase is contained in the input.
Spellcheck scripts which are triggered when one or more words in the input are unrecognized.
In each case, the script must be placed in the Script repository prior to being registered with Access ELF. If the script does not already appear in the repository under the name you are trying to use to register it, a warning message will trigger when you click the activation checkbox.
Except for Phrase scripts, all scripts are registered by typing their name into the scriptname box, then checking the
script option checkbox.
Spellcheck scripts are registered on the Preferences tab.
Analysis, Question and Answer scripts are registered on the Views tab.
Phrase scripts are registered by typing their name into the ScriptName column of the associated phrase in the Phrases window
The ScriptName is both the identifier of the script panel entry (for example, when #INCLUDEing one script panel into another) and the name of the function within that script which will be called when the script is triggered. For this reason, most script panels will contain a function which has the same name as the script
itself. An exception to this might be a script panel which contains utility functions that are included in one or more other scripts. In that case, since the script won't be referenced directly (and isn't registered in any of the four ways described above), it would have no need of a "namesake function".
For more details on how scripts can be put to use, see the Scripting section as well as VB ELF Compatibility Enhancements Detailed examples are available for Analysis scripts, Question scripts, Answer scripts, Spell scripts and Phrase scripts.
Last Updated: March, 2002