Subject: Approach Users Mailing List FAQ, Part 2/2
Date: 10 Sep 1997 09:49:40 GMT
Summary: Answers to Frequently Asked Questions
 provided on the Approach Users Mailing List and the
 comp.databases newsgroup about the Lotus Approach database,
 as well as other material that may be helpful to a wide
 range of Approach users.

Archive-name: databases/approach-mailing-list-faq/part2
Posting-Frequency: monthly
Last-modified: 1997/08/10
 =20

           APPROACH USERS MAILING LIST FAQ, Part 2
           ---------------------------------------

                     10 August, 1997

Part 1 of this FAQ can be obtained by sending an email to
mail-server@rtfm.mit.edu with the following in the body of the message:

send usenet/comp.databases/Approach_Users_Mailing_List_FAQ,_Part_1_2

     7. Some of our collective wisdom so far... (Part 2)
        \ Out of Memory error message
        \ Conversion of old .apr's to Approach 96
        \ Stored Finds in Approach 96/97
        \ Field Formatting (including not / rounding numbers)
        \ Displaying Negative Values In Red
        \ Automatically finding a 'drop down' list entry
        \ Summary fields
        \ Demystifying Summary Functions
        \ Leading zeros
        \ Trailing zeros
        \ Free Approach 3.02 Upgrade
        \ "Record is locked- retry -cancel" error
UPDATED \ Moving or copying databases (.apr/.vew .dbf .dbt files)
        \ "Macro error: Import table has changed" error
        \ Internal Error: Cannot load string 0
        \ "Could not load infobox dynalink" error
        \ Printing formatting problems
        \ Printer problems (including GPFs, HP Printers)
        \ "Page Fault... at 0137:0049eb64" in Approach 96
        \ Approach 3.02 crashing in design mode and when switching
              views
    NEW \ Approach 97 incorrectly exporting numbers via macros
        \ Problems with repeating panels
        \ Working with Paradox database files
        \ Accessing Access files (*.mdb)
        \ Accessing .dbf's by Access / Paradox
UPDATED \ Using index files other than .adx (eg.mdx)
        \ Calculating elapsed time
        \ Calculating ages from birth dates
        \ Calculating number of weekdays
        \ Finding dates within a specified range
        \ 21st Century Dates
        \ Dates before 1929
        \ Date format with 4 digit year (e.g. 1997)
    NEW \ Export of Crosstabs to 1-2-3
        \ Importing Dates
        \ Dates in report titles
        \ Removing unwanted characters from phone numbers
        \ Saving records in their sort order
        \ Record numbering
        \ Sequentially numbering a set of records
        \ Header / Footer problems in v2.1
        \ Automatically opening files
        \ Automatically opening a particular form
        \ Automatic macro on opening/closing View file
        \ Deleting the body in summary reports
        \ Preserving found set when switching forms
        \ Keeping users out of design environment
        \ Database security
        \ Stopping people accidentally entering data
        \ Searches on multipage forms
        \ MS-Windows 95 printing blank pages (v2 & v3)
        \ Radio Buttons field label
        \ Finding the previous weeks records
        \ Finding records which do not contain *text*
        \ Finds on repeating panels fields
        \ Making empty fields disappear
        \ Running a Macro in a different .apr files
        \ Converting numbers to words 34 to thirty-four?
        \ Making keyboard entries into a formula or macro
UPDATED \ Sliding fields together on mailing labels
        \ Generating and reading barcodes
        \ IF limitations in v3.0*
        \ USA Zipcodes
     8. Official Stuff
        \ Acknowledgments
        \ Disclaimer
        \ Copyright
        \ Editor


------------------------------

Subject: 7. Our collective wisdom so far... Part 2


Out of Memory error message
---------------------------

First, careful read through the article 'Optimizing the speed of a databa=
se'
for tips on how to get you database running as sleek as possible.

Also, remove anything that might be unnecessarily using memory, such as
unused forms, worksheets, reports, macros that are no longer needed.

Check the manuals for your operating system to make sure your system
configuration is making optimum of your memory. For instance, if you are
using MS-Windows 3.1 and DOS, check that your EMM386 (probably should be =
set
to NOEMS), and Upper Memory Blocks (UMB) are properly configured and util=
ized.

Conversion of old .apr's to Approach 96
---------------------------------------

The conversion is straight forward, however people have struck problems w=
ith
stored finds. In order to work reliably, all stored finds should be
recreated in Approach 96 and assigned a name. See  'Stored Finds in Appro=
ach
96/97'.

Once an .apr has been converted it can no longer be used by an older vers=
ion
of Approach. Therefore make sure you keep a copy of your old .apr just in
case you strike problems or need the old version for some reason.

Your data remains unchanged and can still be access by any version of
Approach, as well as any other database program that uses the data format
(dBase IV by default) you are using. (MS-Access, Paradox, etc...)

Stored Finds in Approach 96/97
---------------------------

In order to work reliably, all stored finds should be assigned a name.

In v3.0*, when you created a macro and inserted a stored find, this find =
was
always used. There was no need to name the find. However in v96 an unname=
d
stored find is only stored as a 'current find'. If you do this, then that
find will be overwritten by any subsequent unnamed stored finds.

The general consensus seems to be to NOT use the assistant for variable
finds. If the name of the variable field includes spaces, the correct syn=
tax
is @"Name of variable Field"

v96/ v97 are unforgiving regarding mismatched field types when using a
variable with a predefined find.  The find will not work if the variable
field type is not the same as the criteria field (although this DOES work=
 in
v3.02).

Field Formatting (including not / rounding numbers)
----------------

To display a combination of formatted a numbers and text when a number ha=
s
been entered into a field, first make sure the field has been defined wit=
h
the number of significant digits and decimal places that you require, e.g.
if you need to display currency up to $1000 make sure you have defined th=
e
field as a NUMBER, with a length of 4.2.

When displaying the field, either select or enter the format you require =
in
the Styles / Field Format menu item. E.g. Using a field format of:

     #,##0.00 " Miles"

The following will be displayed:

     entered     displayed

      12          12.00  Miles
      .3          0.30  Miles

     #,000.## " Miles"

The following will be displayed:

     entered     displayed

      12          012  Miles
      .3          000.3  Miles

Check the manual and / or the help files for all the rules and options
governing the format codes. This does not change the stored data. It only
changes the way it appears in the field box you are working on.

[For some strange reason, when using above example in v2.1, and v3.0*
(v96?), the data is only displayed correctly if there is a space after th=
e
first quotation mark. If this space is left out so it reads: #,##0.00
"Miles" it will incorrectly display 12.1 as 1.21 Miles. Strange, but true=
!]

Any information that includes anything other than numbers, or even a numb=
er
that needs to be stored with leading zeros, must use a text field. E.g. z=
ip
/ postal codes in many countries, or USA Social Security Numbers which ha=
ve
leading zeros. However, you can still use numeric format to control the
display of a text field.

Displaying Negative Values In Red
---------------------------------

In v2.1 and v3.0*: you need to create 2 calculated fields: one that will
only display the number if it is negative: If(DB.NUMBER < 0, DB.NUMBER, '=
'),
and the other that will only display the number when it is positive:
If(DB.NUMBER >=3D 0, DB.NUMBER, '')

Display these fields on your report or form. Set the Fill Color to
transparent on both of them, and the Pen Color to red on the field that w=
ill
display the negative values. Then use the OBJECT / ALIGNMENT menu item to
place one of the fields directly on top of the another. Set the STYLE /
FIELD STYLE / LABEL: to be blank, and create a separate text box to label
the field if required.

In v96: you can either use the same method outlined for v2.1 and v3.0* sh=
own
above, or use a script such as the one in "Mastering Lotus Approach 96 fo=
r
Windows 95" by James Powell (Sybex / Lotus Books). The script is an examp=
le
they used to demonstrate LotusScript.

Automatically finding a 'drop down' list entry
----------------------------------------------

If you use a "Value List" the list will automatically move to the first
entry for the key you press. E.g. if you press an 'L' it will move to the
first entry starting with 'L'. If you then press an 'E' it will move to t=
he
first entry starting with 'E'.

However, if you use a "Text and Value List" the list will automatically s=
how
the first entry for what you have typed so far. E.g. as before, if you pr=
ess
an 'L' it will show the first entry starting with 'L'. However, if you th=
en
press an 'E' it will show the first entry starting with 'LE', and so fort=
h.
Note: 1) The list won't move down if what you type is already shown on th=
e
list. 2) You have to click or TAB onto the entry you want.

Summary fields
--------------

Calculated fields that have a "summary" type functions like SCOUNT, SSUM,
etc... only work and display properly when they are used on fields in joi=
ned
databases, and not the main database for the form. E.g. If your form is
based on a database called DEPOSITS, which is joined to another database
called BANK then ON THAT FORM you can only use SSUM on BANK fields. A
summary of a DEPOSITS field would have to be displayed on a form that use=
s
BANK as its main database.

Demystifying Summary Functions
-------------------------------

(This article was submitted to the Approach Users Mailing list by Jerry
Sikes, Unisource Converting)

Here is a guideline on proper Summary Functions use. All page references =
are
to Lotus Approach Release 3.0 users Guide, copyright 1994 Approach Softwa=
re
Corporation.

   1. p7-15 - "You can add a calculated field to a form to show a total,
average, count, or other summary on data in a repeating panel." The key i=
s
placement of the summary calculated field "on form", not in panel.

   2. p7-16 - "A summary on data in a repeating panel is calculated in
Browse and Preview, and in Design if you're showing data rather". This me=
ans
that a summary calculated field can be visible in all Approach modes.

   3. p7-16 - In reference to the field definition of a summary calculate=
d
field, "In the Define Summary panel, select "Summary of all records in
database," where database is the name of the main database for the
(repeating)panel;". p7-21 - "Because of the join the function
counts(summarizes) only the records that appear in the (repeating)panel."
Most important aspect for correct calculation is not using the
"Where-placed" default Summary Definition. In Field definition, you must
define the summary for the repeating panels main database.

   4. p8-19 - "For more flexibility, however, you can use a calculated fi=
eld
that has been defined as where-placed, which you can reuse as often as yo=
u
wish. A where-placed calculated field looks at the summary panel it's pla=
ce
in and automatically summarizes" This applies only to report summary pane=
l
usage. You can use the same summary calculated field in leading, trailing=
,
and grand total summary panels. When you place a summary calculated field=
 on
a form, its where-placed is not a summary panel, therefore Approach canno=
t
figure which group of records to summarize in browse.

   5. p8-19 - "A calculated field in a summary panel is calculated when y=
ou
preview the report=F7" This reference applies only to calculated fields i=
n
summary panels. Summary calculated fields are visible on forms provided t=
hey
are defined properly.

   6. A summary calculated field can be bound by Mathematical functions.
Such as; Round(SSum( Database."Item Extension"),2).

   7. A summary calculated field cannot be bound by an If function. The I=
f
function must be bound by the summary calculated field. For example;
Round(SSum( If (Database."Ship Status"=3D"Shipped", Database." Amount",0)=
,2).
This would selectively summarize only those items in the repeating panel
whose status is shipped.

Leading zeros (eg. 00054628)
-------------

To output data with leading zeros create and output a calculated field
containing the formula:

Right(Combine('0000000',DB.NUMBER), 7)

where '7' is the maximum number of digets, and hence the length of the
output string, and 0000000 is a line of zeros of the same length.

Trailing zeros (eg. 1.400)
--------------

First check that you have that the field definition is numeric with the
right number of decimal places.

While in design mode, select the field and then enter the Style/Field For=
mat
menu (v2.1, other versons may be different) and either select one of the
custom numeric field formats provided, or enter your own. For exporting
data, create and export a calculated field containing the formula:

NumToText(DB.NUMBER,'####.00')

where ####.00 is the output forumla you require.

Free Approach 3.02 Upgrade
--------------------------

According to the technotes available at the Lotus web site, version 3.02 =
of
Approach is available free to customers experiencing an issue with Approa=
ch
3.0. Technotes on the following topics all contain the phrase, 'This issu=
e
has been addressed in Approach 3.02':

     * Only One Mailing Label Prints Per Page
     * Error: Unable to Build Index Required for XXX
     * Fill Field Option is Grayed Out in Browse/Worksheet
     * Stack Overflow Running Approach 3.0 QuickStart Tutor.
     * Import Table Has Changed, Unable to Import Data
     * Sending the Current View Only Sends All Views
     * General Protection Fault in Module KRNL386.EXE
     * Record Header Size... Bytes Too Small Saving an .APR
     * Form or Report Places Fields on Top of Each Other
     * Repeating Panel Will Not Sort in Approach 3.0
     * Crosstab Repeats the Same Value in Each Row
     * Changing Number to Boolean Returns Incorrect Results
     * Slow Performance using PowerClick for Grand Total
     * Internal Error - Couldn't Load String 1035 with Spell
     * Approach Export Macro to Fixed Length Inserts Spaces
     * Find Using a Wild Card Returns Blank Date Fields
     * Error: No Records Found Finding Times in DB2 Database
     * Error: Out of Disk Space Finding a Date in SQL or DB2
     * Fields Formatted as Zip Code Corrupt Data in Approach
     * Error: Macro Step Not Valid Editing Valid Macro
     * Percent Format Displays Zeros after the Decimal

So, if you are having troubles in any of the above areas it may pay to ch=
eck
what version of Approach you have (by selecting Help: About Approach). If
you are using 3.00 or 3.01 then you may be able to get a free upgrade to
v3.02 by contacting Lotus.

"Record is locked- retry -cancel" error message
-----------------------------------------------

Sometimes a shared Approach database repeatedly returns a "record is lock=
ed-
retry -cancel" error message, even though the database has been set to
optimistic record locking.

This can occur when the link to the network drive where the data and view
files are held is down. In this situation you need to exit Approach,
reestablish the link to the network drive (usually by rebooting your
workstation), and reopening the database in Approach.

It can also occur for a variety of other more obscure reasons. Some thing=
s
that have been suggested to keep these at bay are:

   * delete excessive windows .tmp files. See 'Optimizing the speed of a
database'

   * keep the users system clocks within a minute or so of each other.

   * put a blank record as the first record in the database. This record
must be devoid of any join relations.

Moving or copying databases (.apr/.vew .dbf .dbt files)
---------------------------

The APR file includes the paths to the files as well as their names.
Therefore unless you reproduce the directory structure exactly at the
destination, the only reliable way to move or copy at database is using t=
he
FILE / SAVE AS menu item from within Approach. If you try and move them
using a file manager program then the database may not be able to locate
some of its components and OLE links may be lost.

However, for some strange reason, Approach returns a "Too many files open=
 at
once" error message if you try to use SAVE AS on a database with more tha=
n
25 joins. If you are using Win 3.1, this happens regardless of how many
files your have specified in your config.sys.

"Macro error: Import table has changed" error
---------------------------------------------

People have reported getting this error and discovering that all their fi=
eld
names have reverted to upper case and have been truncated.

This may be due to a corrupt .adx file. Try deleting and restoring the .a=
dx
as outlined in "Can Approach handle big databases?" article in this FAQ. =
It
may help to do this on a regular basis.

It may also help if you keep your field names to less than 10 characters,
using only uppercase letters, and underscores instead of spaces.

Internal Error: Cannot load string 0
------------------------------------

This error is generated when more than 16 users try to access the same .a=
pr
at the same time in v3.0* (v95...?). In order to get around this, duplica=
te
the .apr, and divided your users across the new .apr/s. All the .apr/s ca=
n
use the same database files.

"Could not load infobox dynalink" error
---------------------------------------

This may be caused by not having done a network install of Approach on th=
e
desktop you are using to link it to the Approach executable on the networ=
k.
To fix this, reinstall  Approach on the desktop, making sure that you do =
a
network install. (also see 'Running Approach on a network')

Printing formatting problems
----------------------------

Also see 'Printer Problems', 'MS-Windows 95 printing blank pages (v2 & v3=
)',
and 'Header / Footer problems in v2.1'

If you are missing edges of pages, first check the printer setup in the
printers section of the MS-Windows Control Panel.

Also, in design check that all of your page boundaries are set correctly.

Printer problems (including GPFs, HP Printers)
----------------

A simple thing to try is to select the default printer in the printer set=
up
(evening if you are currently using it), and then back to whatever set up
you want. This ensures that the current set up is correct.

Then, download the latest drivers for your printer. Search your disk driv=
es
and remove all old versions of the printer driver before installing the n=
ew
one. If you are using Approach on a network make sure all the drivers hav=
e
been removed from the workstations and install the new driver on the serv=
er
for network printers.

If this doesn't fix the problems, search the Lotus technotes for tips and
solutions concerning your printer.

If that doesn't help, contact the technical support people for your print=
er
to see what they have to offer. Searching for their web site is a good pl=
ace
to start as they probably have FAQs and the latest drivers there.

Note: You may get differently results from different versions of Approach=
 at
the same time, so for consistency its best to stick to using one version.

And just in case your wondering, for everybody that says that Approach
doesn't work well with HP printers there is somebody else that says they =
use
a variety of HP printers and never have a problem... Go figure! However, =
if
you are having problems here are some work arounds that have been suggest=
ed:

If you are using MS-Windows 3.1 try updating to MS-Windows 3.11 (or later=
),
and make sure you are using the latest drivers. This seems to solve some
problems. Similarly with MS-DOS, if you are not using MS-DOS 6.22 then
perhaps you should try it (with the latest drivers of course).

If you design a report for a 300dpi printer and then later switch to a 60=
0
dpi you will probably get clipped text. One suggestion is to use a macro =
to
set the printer to 300dpi and then print the report. Otherwise you could
simply recreate the report for the 600dpi printer.

You could also try using current drivers for older models. E.g. if you ar=
e
using a HP4, try using a HP3 driver. You never know, it just might work!?

"Page Fault... at 0137:0049eb64" in Approach 96
-----------------------------------------------

To avoid getting "APPROACH caused an invalid page fault in module
APPROACH.EXE at 0137:0049eb64" errors when entering new records in Approa=
ch
96, turn off the "In Field" option.

Approach 3.02 crashing in design mode and when switshing views
--------------------------------------------------------------

A different times people have reported that this is due to the fontmod.dl=
l
file in the Windows System directory being replaced by a new installation=
 of
some other program (e.g. Quickbooks). To fix this just replace the new co=
py
of the fontmod.dll file in the Windows System directory with Approach's
version found in the Approach directory.=20

Approach 97 incorrectly exporting numbers via macros
----------------------------------------------------

Approach 97 has a bug in its exporting of numeric values via macros. If y=
ou
are experiencing any difficulties you can get a pug fix from the Lotus we=
ebsite:

http://www.lotus.com

Check out technote 148713, title:  Incorrect Results Exporting Numeric
Values Via Macro


Problems with repeating panels
------------------------------

Firstly, does the repeating panel contain the right fields? If so, try
moving the repeating panel a bit on the form. Do the fields move with it?=
 If
not then they are not really in the repeating panel. To correct this, sel=
ect
all the fields and cut them from the form; select the repeating panel so
that the panel edges are highlighted and paste the fields into it. Try
moving it again to check they are now in the repeating panel. If they sti=
ll
don't move, try deleting both the fields and repeating panel and setting =
it
up from scratch.

Other things you may need to check are whether or not the data is actuall=
y
there in the right database and fields, and that the database is
meaningfully joined to the parent database.

Working with Paradox database files
-----------------------------------

A number of people have reported indexing and General Protection Fault
problems when working with Paradox files. To avoid these make sure you ar=
e
using:

  either: Approach v3.02 on MS-Windows 3.1 or (WFWG v3.11)

      or: Approach 96 on MS-Windows 95.

You will find problems if you attempt to use v3.0* on MS-Windows 96, or i=
f
you use v3.00 or 3.01 on any operating system. However, you will probably=
 be
better off converting your database files to dBase IV. Also see "Accessin=
g
.dbf's updated by Access / Paradox"

Accessing Access files (*.mdb)
----------------------

The 16-bit ODBC drivers for Access 2.0 can be purchased from Microsoft.

The 32-bit driver is available from:

http://www.microsoft.com/odbc/download/default.htm

However, it can only be installed if you have a Microsoft product already
installed on your hard drive. If you don't have any Microsoft products th=
en
you will need purchase a third party driver set from a company like Inter=
solv:

http://www.intersolv.com

Accessing .dbf's updated by Access / Paradox
--------------------------------------------

When records are added to a database using a different database
application, Approach's index file (.adx) is not updated, and therefore
Approach cannot access the new records. The indexes can be rebuilt by
closing and reopening Approach. Once this is done the new data can be see=
n.
Apart from this inconvenience, adding data to a database using other
applications while Approach is open, may also increase the possibility of
index files becoming corrupt. It's therefore not recommended.

Using index files other than .adx (eg.mdx)
---------------------------------

All version of Approach are capable of maintaining .mdx index files used =
by
other database applications, but it is not capable of creating them. If y=
ou
need to use them you have to first create them using some other program.

Note: Somebody said that v96 was able to maintain .mbx indexes, but not v=
97,
which seems a bit odd but it stranger things have happened...

Calculating elapsed time
------------------------

The following forumlas have been suggested to calculated elapsed time ove=
r
the 00:00 boundary:

Either:

((Trunc(FinishDate) + (Trunc(FinishTime) / 8640000)) - (Trunc(StartDate) =
+
(Trunc(StartTime) / 8640000))) * 24

Or:

((24 * (Date_expire) + time_exp))-((24 * (Date_ent) + time_ent))

Calculating ages from birth dates
----------------------------------

The following formula produces a line of text e.g. "Age: 32 yrs 6 mths". =
If
the PEOPLE.BIRTHDATE is empty them it produces an empty text string i.e..=
""

If(Isblank(PEOPLE.BIRTHDATE), '', If((Month(Today()) -
Month(PEOPLE.BIRTHDATE)) < 0, Combine('Age: ', (Year(Today()) -
Year(PEOPLE.BIRTHDATE) - 1), ' yrs ', (12 + Month(Today()) -
Month(PEOPLE.BIRTHDATE)), ' mths'), Combine('Age: ', (Year(Today()) -
Year(PEOPLE.BIRTHDATE)), ' yrs ', (Month(Today()) -
Month(PEOPLE.BIRTHDATE)), ' mths')))

The next formula just returns the ages in years and increments on the exa=
ct
birthday:=20

If(Month(Today()) < Month(PEOPLE.BIRTHDATE)  or Month(Today()) =3D
Month(PEOPLE.BIRTHDATE) and Day(Today()) < Day(PEOPLE.BIRTHDATE),
Year(Today()) - Year(PEOPLE.BIRTHDATE) - 1, Year(Today()) - Year(DOB))

The last forumla gives you the persons exact age in days. You can then
roughly calculate how many years and months, but since months and years a=
re
different lengths the answer is an approximation, give or take a few days=
:

If(isblank(PEOPLE.BIRTHDATE),'',Trunc(((today()-
PEOPLE.BIRTHDATE/365.25),0))

Calculating number of weekdays
--------------------------------

The following formula will return the number of weekdays between the date=
s
contained in DB.STARTDATE and DB.ENDDATE:

If(Year(DB.STARTDATE)<>Year(DB.ENDDATE),DB.ENDDATE-DB.STARTDATE-(WeekOfYe=
ar(
DB.ENDDATE)+(Year(DB.ENDDATE
)-Year(DB.STARTDATE)-Year(DB.STARTDATE))*52-WeekofYear(DB.STARTDATE))*2,D=
B.E
NDDATE-DB.STARTDATE-(Weekof      Year(DB.ENDDATE)-WeekofYear(DB.STARTDATE=
))*2)

You can have the formula automatically subtract any public holidays, if a=
ny,
by adding the following formula segment for each possible public holiday:

-If(START <=3D '25/12/96' and FINISH >=3D '25/12/96', 1, 0)

where 25/12/96 is a public holiday. Make sure you use the same date forma=
t
as your database.

Finding dates within a specified range
--------------------------------------

Try using or adapting the following formulas:

   For NOT December: IF(month(date_field)<>12)
   For this month: IF(month(today())=3Dmonth(date_field))
   For December 1996: IF(month(date_field)<>12 AND
                          year(date_field)=3D1996)
   For the last 90 days: <=3D@TODAY()&>=3D@TODAY()-90

In v96 (and following), To find "This Month" use the Find Assistant and o=
pt
for "This Month".
  =20
21st Century Dates
------------------

If you enter the full year (e.g. 10/31/2001) you should not encounter
problems. However, if you want to enter dates like 10/31/01, and you want=
 to
add only future dates you can use the following solution.

Create 3 variable fields, all 2 digit numbers: VYear, VMonth, VDay. Displ=
ay
these three fields on your form. Enter the dates using these three fields.
Create a calculated field called VEYear containing the formula If(VYear =3D=
>
95, (If(VYear <=3D 99, VYear, VYear + 2000)), VYear + 2000.

Then create another calculated field called, say, DISPLAYDATE containing =
the
formula: DATE(VMonth,VDay,VEYear). DISPLAYDATE will contain the full 21st
century date.

Dates before 1929
-----------------

Approach 96 assumes that any year less than '30 is in the next century,
i.e., 2029, instead of 1929. To avoid problems that this may cause you
should use full 4 digit year format.

Date format with 4 digit year (e.g. 1997)
-----------------------------

This is set in MS-Windows, not in Approach. In MS-Windows 3.1* see
International / Regional settings in the Control Panel.

Export of Crosstabs to 1-2-3
----------------------------

Just copy and paste it! Highlight the entire crosstab by clicking in the
upper left corner, then copy it. Switch over to your spreadsheet, and pas=
te it.

Importing Dates
---------------

Approach only recognizes date field in mm/dd/yy format.

If possible you should export the data from the old application using thi=
s
data format. Try using a dBase export filter if the program has one.

If you are not able to do this and are therefore importing dates that are
currently stored in a different format then you will need to import them
into a text field, and write some macros to convert the data in to mm/dd/=
yy
format.

E.g. to convert yyyy-mm-dd to mm/dd/yy a macro would use the formula:

TextToDate(Combine(Middle(initial_date,6,2),'/',Middle(initial_date,9,2),=
'/'
,Middle(initial_date,3,2)))

EXCEL uses a slightly different method of calculating dates than 'industr=
y
standard' adopted from 1-2-3. This means that imported EXCEL dates are 36=
6
days out. The easiest way around this is to export the data from EXCEL in=
to
dBase file and import it into Approach from there.

Dates in report titles
----------------------

To include the date range of a found set in the title of the report, use =
the
SMin and SMax functions to create calculated fields that hold the start a=
nd
end dates for your found set.  Then insert these calculated fields into t=
he
title of the report.

Removing unwanted characters from phone numbers
-----------------------------------------------

The following formula removes all '-', '(', '(', and ' ' characters from =
a
phone number. E.g. it turns (123) 4567 8987 into 12345678987 This may be
necessary if phone numbers have been imported with these unwanted charact=
ers.=20

You can them use Field Format to display the phone number however you wan=
t.

Translate(Translate(Translate(Translate(contacts.Phone, '-', ''), ')',
''), '(', ''), ' ', '')

Saving records in their sort order
----------------------------------

Sort the records as you want them, and then export (ALT-FILE-EXPORT) that
database into a new .dbf file. This .dbf must contain the same files as t=
he
old .dbf. Delete the old .dbf and rename the new .dbf with the old .dbf f=
ile
name.  e.g. Say you have a database called PEOPLE.DBF. Sort the records a=
nd
export all the fields in PEOPLE.DBF into another database called TEMP.DBF.
Exit Approach. Delete PEOPLE.DBF. Rename TEMP.DBF as PEOPLE.DBF.

Record numbering
----------------

The record numbers that Approach allocates are used only for its own
administration of your database. When a record is deleted all the records
after it are renumbered etc... The record numbers are not part of your da=
ta.
If you want each record to have a fixed reference number that never chang=
es
as long as the record continues to exist, then you need to create a numer=
ic
'serial number' field which automatically increments each time a new reco=
rd
is created. See the options associated with numeric fields. Also see
'Sequentially numbering a set of records'

Sequentially numbering a set of records
---------------------------------------

To sequentially number a set of records, create one numeric field and one
variable field. In v3.0* and later create two macros:

Macro 1:
Set the variable field =3D 1
Set the numeric field =3D variable field
Run Macro 2 and return to the next line on this macro
View =3D ??

Macro 2:
Set the variable field =3D variable field + 1
Set the numeric field =3D variable field
Run Macro 2

In V2.1 you need to use three macros:

Macro 1:
Set the variable field to 1
Run Macro 2

Macro 2:
Set the numeric field to variable field
Menu Options: Next Record
Run Macro 3

Macro 3:
Set the variable field to variable field + 1
Run Macro 2

Also see 'Record numbering'

Header / Footer problems in v2.1
----------------------------------

People have experience problems where the top or bottom half of the foote=
r
or header line is cut off in v2.1. The easiest way to get rid of this typ=
e
of problem is to recreate the report from scratch - this is likely to be
quicker and easier than spending to much time playing with your current o=
ne.
1) set the printer setup to the correct values  2) create a very simple
report using all the default values. Just specify  a couple of fields fro=
m
the database the report is based on.  3) immediately insert and set up th=
e
footer and header as required. Do a couple of test prints to make sure it=
 is
right.  4) finally, set up the report contents the way you want it - inse=
rt
further fields, do formatting etc...

Automatically opening files
---------------------------

Make sure .apr (.vew for v2.1) extensions are associated with Approach. Y=
ou
can do this in the File/Associate menu of File Manger. Then create a Wind=
ows
program item with a command line something like:=20

c:\path\database.apr (for >v3.0*)

where a:, \path, and database.* are the drive, path, and filename of your
database file.

To automatically open several files use the command line:

c:\approach\approach.exe c:\path\db1.apr c:\path\db2.apr

Use .vew instead of .apr for v2.1 files

Automatically opening a particular form
---------------------------------------

Approach automatically opens the form that you had up on the screen the l=
ast
time you saved the .apr file (or .vew in v2.1). So next time you make som=
e
changes make sure the right form is on the screen when you save it.
Alternatively you can set up a macro to automatically change to that form
when the database is opened. (See "Automatic macro on opening/closing Vie=
w
file")

Automatic macro on opening/closing View file
----------------------------------------------

You can create a macro that runs automatically each time you open a
particular approach view file by assigning it the name "OPEN". Similarly,=
 if
you assign the name "CLOSE" to a macro it will run each time you close it=
's
associated file.

In Approach 96, you can also do it by specifying the macro in the form
properties.
  =20
Deleting the body in summary reports
------------------------------------

Use your mouse to drag the bottom line of the body frame up above the top
line of the body frame. That way the body disappears and only the summary
lines show up on the report.

Preserving found set when switching forms
-----------------------------------------

Make sure all of your forms are based on the one database. When creating =
a
new database do not create the .vew or .apr based on that database (or
delete it if you do). Instead, create your new form based on your main
database rather than your newly created one.

Keeping users out of design environment
---------------------------------------

If you are using v3.0* you can set a design mode password by selecting th=
e
Tools/Preferences/Password menu item. Approach will then not let anyone i=
n
design unless they know the password (even by status bar, icon or key
combination).

Read on if you are using v2.1, or if you would also like to remove the
temptation of changing the form:

Menus can be customized so that the design environment option never appea=
rs.
Apparently, custom menus are kept in .APR files so that no custom files o=
n
user PCs would be required.

Icon bars can be customized so the design environment icon never appears.

The status bar on the bottom of the Approach window will let the user go
into the design environment. The status bar can be suppressed but this
prevents the user from reading useful information such as current record
number and how many records were found out of how many.  There are no
Approach macros and formulas that support display of such record informat=
ion
on a form.=20

In v2.1 there is no way to prevent a user from getting into the design
environment via CTRL-D.=20

.APR / .VEW files can be made read-only by changing their properties in F=
ile
Manager, but if a user gets into the design environment, Approach won't t=
ell
them they cannot save design changes until they try to save their changes=
,
and they may know how to change the file properties.

Database security
-----------------

In v2.1 you can give each .dbf a password which is set in the FILE /
DATABASE OPTIONS menu in design mode. Passwords can be set for either
read-only or read-write access. However, the user has to enter a password
for each joined .dbf that requires it.

A better alternative may be to create your own security system. The first
view that users see could prompt them for an ID and password, this checks
against a list of users and sets a variable field to their security level.
All macros that switch to a view could then check if the current user has
the right access level.

In v3.0*, is exactly the same but passwords are set in TOOLS / PREFERENCE=
S.

v96 and v97 come with a team security feature. See the manuals and / or h=
elp
for details.

 On a network, another consideration would be to set the network director=
y
as read-only. This may result in the user receiving  only annoying side
effect is that a read-only person will see a message for each joined
database saying that the file is read-only.

Stopping people accidentally entering data
------------------------------------------

One way of doing this is to create two separate forms: one for data entry
and on for retrieval. Make all the fields on the retrieval form read-only=
 so
that data cannot be entered.

Searches on multipage forms
---------------------------

Make a single page form that contains all of the fields that you want to
search on. Switch to this search form, do the find, and then switch back =
to
your multipage form. The found set will be preserved as long as search fo=
rm
must also be based on the same database as your original multipage form.
    =20
MS-Windows 95 printing blank pages (v2 & v3)
-------------------------------------------

To stop Approach from printing out a blank page after every printed page =
in
Windows 95, make the following change to your WIN.INI file: Under the
[Compatibility] heading change

'Approach=3D0x0004'

   ... by putting a ';' in front of it so that it reads

';Approach=3D0x0004'.

Then save and reboot.=20

A side effect of this is that it effects the printing of field definition=
s
and macros. Lotus recommends using either a Win 95 PostScript driver, or =
an
older Win 3.x driver. Look for Document=A0#132676 on the Lotus web site.
http://www.lotus.com

NOTE: The problem will recur if you reinstall Approach or over write the
WIN.INI file with an older version. If this happens then repeat the proce=
ss
  =20
Radio Buttons Field Label
-------------------------

Question: When using radio buttons, why can't I maintain the field label,=
 as
in getting it to appear above / below / etc. / anywhere in the box?

Page 6-12 of my User's Guide shows an example with a field label Type of
Customer. But I have been unable to generate a similar example.

Answer: They got tricky. What they did to accomplish that is to create a
Text Box and type the box label Type of Customer. Then they created their
Radio Buttons box (outside of the text box, clicked the right mouse butto=
n,
chose ARRANGE, BRING TO FRONT, and then dragged the radio buttons on top =
of
the text box they way they wanted it.

Play with it a bit and you'll get the results you're looking for.
  =20
Find the previous weeks records
-------------------------------

For the previous week (Sun - Sat): ('date'=3D your date field)

     if(weekofyear(date)=3Dweekofyear(today())-1 and
          year(date)=3Dyear(today()))

If the data is only for one year, then you can leave out the 'and' and al=
l
that follows.
  =20
For the last 7 days: (including today)=20

     >=3D@TODAY()&<=3D@TODAY()+7
 =20
Or, if you need to find records produced during the last 7 days:

... starting with and including today's date, use the formula:=20

     >=3D@TODAY()&<=3D@TODAY()+7

Finding records which do not contain *text*
-------------------------------------------

In Find, enter the following formula in any field:

if(NOT like(DBFNAME.fieldname,'*text-in-question*'))

Finds on repeating panels fields
--------------------------------

If any find criteria are put in a repeating panel the find will return al=
l
the records that fulfill the criteria but will not display any other reco=
rds
in the repeating panel. A way around this is to set up a view that shows =
the
specific fields you will be searching. Do your search with that view, the=
n
switch back to your original view with the found set.=20

Make empty fields disappear
---------------------------
     (... rather than just turn invisible)

It is possible on reports but not on forms.

An alternative is to set up a multipage form and have a separate page for
each field. On the first page, put a check box for each field set to
automatically come on if there is an entry in the field. Then, when you a=
re
browsing through the forms, you look at the page if you need to.
 =20
Running a Macro in a different .apr files
-----------------------------------------

One way of doing this would be to use  the Windows Macros (Recorder) rath=
er
than Approach Macros.
 =20
Converting numbers to words 34 to thirty-four?
----------------------------------------------

There isn't such a function built into any version of Approach. For Appro=
ach
v96 there is a LotusScript called ConvertNumberToText in the Archive of
Scripts (see section 3. Notices: How to get the Archive of Scripts) which
works for numbers up to 999 999 999.

If you are using v2.1 or 3.0* you need create another database with the
numbers and related text versions of the numbers, and join it into your
current database to the field that you want to appear as text.

It might look something like this:

     number     text
       1        one
       2        two
      ..        ...
      27        twenty seven

Making keyboard entries into a formula or macro
------------------------------------------------

To do this, link every record in your database to a single record in a
specially created database. Fields in this record in the special database
can be easily changed by putting the fields on any form, and can be used =
to
input information required by any macro or formula. The method for doing
this in Approach v2.1 is as follows:

  1) In your existing database (let's call it EBASE) create a new field
called (say) DUMMYLINK, and set the field definition options so that a '1=
'
is automatically entered into DUMMYLINK every time a new record is create=
d.
Then enter a '1' into the DUMMYLINK field in all existing records. The en=
d
result of this is that every record in EBASE will always have a '1' in th=
e
DUMMYLINK field. Once it is set up there is no need for DUMMYLINK to appe=
ar
on any forms.

  2) Then create a new database (INPUTDBASE), with two fields INPUTDATA, =
and
DUMMYLINK. Create one (and only one) record and enter '1' into the its
DUMMYLINK field. Then join INPUTDBASE to EBASE by the DUMMYLINK fields. T=
he
data you enter into the INPUTDATA field is now linked to every record in =
EBASE.=20

  3) Put the EBASE:INPUTDBASE field onto any form or forms you commonly u=
se.

  4) Create the macro or formula using the EBASE:INPUTDBASE
field where you want to input data.

e.g. In an phone book database you could enter your current location into
the INPUTDATA field. This information could then be used by various formu=
las
to calculate the actual phone numbers you need to dial from there, includ=
ing
any national, or international codes, as well as perhaps giving the time =
and
date at the destination.

(Could somebody please confirm if this procedure is required for v3.0x)
  =20
Sliding fields together on mailing labels
-----------------------------------------

If you are having difficulty getting fields to slide together on mailing
labels (such as first and seconds names), try setting up a formula that
combines the fields in the format you want, and then print the formula
instead of the individual fields. Eg.

Trim(Combine(SALUTATION,if(SALUTATION =3D '','', ' '), FIRST_NAME, ' ',
Trim(MIDDLE_INI),if(MIDDLE_INI =3D '','',' '), LAST_NAME))

This routine only inserts spaces where they are required.

For a complete label with and optional second address line, the formula
would look something like:

Combine(FIRST_NAME, ' ', SURNAME, Chr(13), If(Isblank(ADDRESS2),
Combine(ADDRESS, Chr(13), CITY, ' ', STATE, ' ', POSTCODE), Combine(ADDRE=
SS,
Chr(13), ADDRESS2, Chr(13), CITY, ' ', STATE, ' ', POSTCODE)))

Another way of dealing with this problem is to create a text object and
embed the fields in it. The fields are expressed as <<database.field>> wh=
ere
DATABASE is the name of the database and field is the name of the field.
e.g. <<database.city>>, <<database.state>> <<database.zip>>

Generating and reading barcodes
-------------------------------

There are really specific instructions on the Lotus web site about this.
Just search the knowledgebase in the Approach support area.

http://www.lotus.com

IF limitations in v3.0*
-----------------------

v3.0* allows for a maximum of 30 levels of imbedded IF's e.g.:

FIELD1=3DIF(x,a,IF(y,b(IF z,c,IF...

To get around this, simply use additional formulae, e.g.:

FIELD1=3DIF(x,a,IF(y,b(IF z,c,FIELD2)))
FIELD2=3D(IF(x1,a1,IF(y1,b1,IF(z1,c1...)))

USA Zipcodes
------------

These are available from:

    * The v96 CD-ROM includes zipcode.apr, zipcode.adx
and zipcode.dbf. zipecode.dbf in the Extra\Dbases directory (78,000 listi=
ngs)
    * http://www2.support.lotus.com/ftp/www/TopDownloads/approach.html
includes a complete US zipcode file.
    * http://www.lycos.com (enter zipcodes)
    * Try the US postal service: http://www.usps.gov/

------------------------------
 =20
Subject: 8. Official Stuff (again)
 =20
  =20
The following people have contributed information to the mailing list whi=
ch
is contained within this FAQ:

Adam Glick
Alan Shein
Andrew C. Pang
Anthony Barker
Atholl Tomlinson
Barbara Hull
Ben Schorr
Bernard Victor
Bernie Sakel
'Bigjc6991'
Bill Bosking
Bill Tarkulich
'Bobj19'
Brian Majesty
Bruno Dumon
Carl E Lloyd
'CedarsMT'
Charles Atkinson
Charles T. Hall
Chris Holcombe
Cornel Huth
David Gilder
David Sherman
'DiamondAsc'
Dominic Fairfax
Donald Ravey
Doug S. Varney
Doug Tymes
Ed Recker
Elizabeth Durkin
Fred Kennedy
Godfrey D'Souza
Ian Curry
Jack Bown
James McCall
Jerry Sikes
Jim Berry
Joe Chaitin
Joe Duffus
'JoeF3900'
Lewis N. Payton
Linda Emmele
Mark Pearson
Mark Wright
Michael Attenborough
Michael J. Cook
Mike Armour
Mike J. Vincelette
Patrick Timmins
Peter M Ladstaetter
R M Reddicks
Rhodri Edwards
Richard A. Garrard
Richard Preston
Robert G.S. Reed
Robert McDowell
Rosemary Culley=20
Scott 'pccscott'
Steve Llanso
Stuart Tucker
Sue Clark
'TKDGuy'
Tim Cook
Vance Jochim
Walter Thompson
Wayne Maeda
Zarief Marzuki B Lao

Some information was also gathered from the Lotus Web Site.

If you would like you name added to this esteemed list, please feel free =
to
post some helpful suggestions and answers to the Approach Users Mailing L=
ist.

Disclaimer
----------

This document is provided as is without any express or implied warranties.
The editor and contributors assume no responsibility for errors or
omissions, or for damages resulting from the use of the information
contained herein.
   =20
Copyright
---------

(C) Copyright 1997 by John Brown, all rights reserved. Permission is give=
n
for this document to be distributed in electronic form (such as email,
newsgroups, and the WWW) as long as it is posted in its entirety includin=
g
this copyright statement, and is not distributed for financial gain.

Editor
------

Editor: b3104977@bohm.anu.edu.au (John Brown)
  =20

