From: "tom frazer" <tom.frazer@canrem.com>
Subject: on key search routine
Reply-To: "tom frazer" <tom.frazer@canrem.com>
Organization: Canada Remote Systems
Distribution: bit
Date: 12 Nov 92 03:10:11 EST

To: thamilto@PCOCD2.INTEL.COM

>Hello everyone. A co-worker sent this request to me to forward to the list,
>so here it goes. FYI: we are using dBase IV 1.5 - network version.

> Is there anybody out there...
>
> that knows how to create a `on key search routine` like
> the one that dBASE uses for help.
>
> I want to create a browse with two or more fields displayed where
> the user can hit a key and be placed at the first record that
> matches the key (i.e. first record with a first character that matches
> the key entered). If there exist more then one record, the user must
> be able to hit another key to further specify the search.

    Checked and found out I was wrong, the program I was thinking about
did not come on the disks from the Borland seminar, they are available on
the BBSes as BROW1_01.ZIP.
    The file contains a database, mdx file, .bin, .prg and text.
    Here's the program code, don't know if it will help with out the .bin

*:*********************************************************************
*:
*:        Program: BROWDEMO.PRG
*:
*:         System: BROWSE / POPUP Demo
*:         Author: Ron Blechman
*:      Copyright (c) 1990, Sound Processes, Inc.
*:  Last modified: 08/16/90      5:03
*:
*:  Procs & Fncts: KEYHAND
*:               : KEYDISP
*:
*:          Calls: KEYHAND        (procedure in BROWDEMO.PRG)
*:
*:           Uses: (DBFILE).DBF
*:
*:   Binary Files: KEYBD.BIN
*:
*:      Documented 08/16/90 at 05:06                SNAP!  version 4.02d
*:*********************************************************************


**************************************************************************
*  DISCLAIMER: This program is provided as is for demonstration
*              purposes only. Its sole intent is for enlightenment
*              within the dBASE development community.
*              Feel free to incorporate these concepts within
*              your own applications as you see fit.
*              - Ron Blechman
***************************************************************************

SET TALK OFF
SET ESCAPE OFF
SET SCOREBOARD OFF
SET STATUS OFF
CLOSE ALL
db1_0 =  ("1.0" $ VERSION())  && Set to True if dBASE IV 1.0

LOAD keybd

CLEAR

@ 20, 30 SAY "BROWDEMO - Version 1.01"
# 6, 8 TO 18,72
@ 8, 16 SAY "The following is an demonstration of how BROWSE"
@ 9, 16 SAY "can be used as an alternative to POPUPs."
@ 11, 16 SAY "By: Ron Blechman"
@ 12, 20 SAY "Sound Processes, Inc."
@ 13, 20 SAY "6 Laurel Drive"
@ 14, 20 SAY "Fair Haven, NJ 07704"
@ 16, 16 SAY "Press any key to continue...."
foo = INKEY(0)

demoit = .T.
DO WHILE demoit

   CLEAR

   **************************************************************
   * Browdemo.dbf has been indexed with 3 examples
   * ORDER Fullname = UPPER(Lastname - "," - Firstname)
   * ORDER Fullname2 = UPPER(Lastname - Firstname)
   * ORDER Fullname3 = UPPER(Lastname + Firstname)
   *
   * Note that Fullname2 and Fullname3 have problems when
   * searching/ording similar last and firstnames.
   * (e.g. Try searching for the string "you")
   **************************************************************
---
--
Canada Remote Systems  - Toronto, Ontario
World's Largest PCBOARD System - 416-629-7000/629-7044
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU