This file contains:

1. A collection of some validity check pictures contributed by CIS Borland
     Form members, taken from the form and Lapels newsletter

2. A script to automate setting the pictures into your tables.

*********************** Some pictures **************************************

-------------------------------------------------------------------------
General
-------------------------------------------------------------------------
   ###-##-####                        ; SSN
   *!                                 ; All upper case
   !*@                                ; First letter capitalized
   Yes,No,Maybe                       ; Allows only values "Yes", "No", and
                                      ;  "Maybe" to be entered in a field. The
                                      ;  user need only press Y, N, or M and
                                      ;  paradox will fill in the rest.
                                      ;  Note that when typing do not put any
                                      ;  spaces after the commas   (2)

-------------------------------------------------------------------------
Dates & months
-------------------------------------------------------------------------
  #[#]/#[#]/##
  ##/##/##
  {1[0,1,2],0#,#}/01/8#               ; Only 1st of month for years in 80's (2)
  Feb,Sep,Oct,Nov,Dec,J{an,u{n,l}},Ma{r,y},A{pr,ug}
                                      ; Allows only the 3-letter abbreviations
                                      ; for the year, "Jan", etc.           (2)

-------------------------------------------------------------------------
Phone numbers
-------------------------------------------------------------------------
  ###-###{#,-####}[x#*#]             ; Phone with or without area code.  Also
                                     ;  allows an extension, beginning with the
                                     ;  the letter x, such as 378-4111x111 (2)

  (619)###-####,(###)###-####        ; Phone number allowing easy space bar
                                     ;  entry for local area code (3)


-------------------------------------------------------------------------
Proper form  (Capitalizes the first letter of every word in the field.)
-------------------------------------------------------------------------

   "!*[ !,@]"                         ; capitalizes after a space

   !*[{ *[ ],-*[ ],.*[ ],;,*[ ]}!,@]  ;Allow for embedded blanks for more than
                                      ;  one character, and also capitalizes
                                      ;  after the hyphen, period and comma.(1)
   !*[{ ,.,(,;,}*{ ,.,(,;,}!,@]       ;Also capitalizes first letter following
                                      ;  a period, praenthesis, or comma.  For
                                      ;  example, "E.E. Cummings, Poet (Am)" (2)

-------------------------------------------------------------------------
States & Zip Codes
-------------------------------------------------------------------------
   &&                                 ; US State
   #####                              ; Zip code, 5
   #####[-####]                       ; Zip code with optional plus 4 digits
   #####[-####],&#&#&#                ; Zip also allows Canadian & British zip
                                      ;  such as "L3H1H5"  (2)

-------------------------------------------------------------------------
Time
-------------------------------------------------------------------------
  Fortunately, AM comes before PM in the alphabet.  Change your table
  to give you the following two fields among the others you need.

        Name     Size        ValCheck
  -------------------------------------------
        AM/PM    A2*          {A,P}M
        Time     A5*          ##:##

  Put the AM/PM field before the Size field in the table, but AFTER it on the
  form, which will be more logical to your users.  So then your users enter a
  time, then "A" or "P", and data entry is easy.  But the table itself will be
  sorted with the AM's before the PM's.  (1)

-------------------------------------------------------------------------
DOS filename
-------------------------------------------------------------------------

  Checking for a valid DOS filename:
  "!" will not do the trick, since it allows invalid characters to be inserted.
  I use the following ValCheck to do what you need:

    {&,#,_}*7[&,#,_].*3[&,#,_]

   This requires at least one character, and will insert the period.  The
   extension is optional.  The "&" allows letter only; the "#" allows numbers
   only, and I also permit the underscore.  Other characters are valid in DOS
   filenames, but I don't want the valcheck to get too long; this seems like a
   good compromise. (1)

-------------------------------------------------------------------------
Number series like  1-4,5,7,11-20
-------------------------------------------------------------------------

   I need to express number series in a user-friendly (i.e. natural)
   fashion such as:   1-4,5,7,8-20 (4)

    #[#[#]][-#[#[#]]]*{;,#[#[#]][-#[#[#]]]}

   which limits me to 3 digit numbers (which is ok).  The thing that makes
   it ugly is forcing a comma before the 2nd-nth 'terms' rather than AFTER
   the 1st-(n-1)th (which would give "1," or "1-4,5,").  (4)


(1) Dan Ehrmann
(2) Brian Smith (part of "Pretty Pictures", an article by Brian Smith,
    Feb 87 LAPALS Newsletter)  Used with Brian permission.
(3) Tim Colling
(4) Chris Nelson


*********************** A script **************************************

A version of this script first appeared in Paradox User's Journal  Apr 88,
written by Bruce Pappas.  It later appeared on the Borland Form in a discussion
between Don Schubert & Alan Zenreich (May 88) and has had further changes.


PROC PICTURE()
 PRIVATE zchoice
 IF SYSMODE() = "Edit" OR SYSMODE() = "DataEntry" THEN
  SHOWMENU
  ; Put the pictures you want here:
   "##/##/##"                     : "Date",
   "&&"                           : "State",
   "Clear"                        : "Clear picture",
   "Quit"                         : "No picture"
  TO zchoice
  IF zchoice = "Quit" THEN RETURN
  ENDIF
  WAIT RECORD
   PROMPT "Use -\016 and \017- to move to field for which you want",
          "Then press \017\217 to select that field."    ; arrows displayed
   UNTIL "Enter","Esc"
  if retval="Esc" then
    return
  endif
  IF zchoice = "Clear" THEN MENU {ValCheck} {Clear} {Field} ENTER RETURN
  ENDIF
  MENU {ValCheck} {Define} ENTER {Picture}
  SELECT zchoice
 ELSE
  MESSAGE "Must be in Edit or DataEntry Mode"
  SLEEP 2000
 ENDIF
ENDPROC

; one way to use this is have the above proc  picture() in the default
; directory as the script PICTURE.SC.
; Then use setkey to call it:  {Alt-F10} Miniscript
; Then enter: Setkey -102 Play "Picture" picture() release procs picture
; call it with {Ctrl-F9}

*********************** This file **************************************

Compiled by Bob Foster 72150,1050
Please report errors or changes.  When (if?) I receive more input I will
update this file     -bob-  1/6/89

