home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 9
/
MEDIASHARE_09.ISO
/
dbase
/
bbdo23.zip
/
CUSTOM.PRG
< prev
next >
Wrap
Text File
|
1993-05-02
|
3KB
|
60 lines
*****************************************************************************
**-- Copyright 1993 B&B Systems DOALL *
**-- You can modify this file anyway you want *
**-- After making ANY changes here, this file needs to be *
**-- compiled with FoxPro to make an .FXP file. *
*****************************************************************************
**-- SAMPLE #1
**-- The line below will search for a data base file called
**-- Product.dbf, after entering <CTRL-F2>. If found it will be displayed
**-- on the screen.
ON KEY LABEL CTRL+F2 DO filelook WITH 'PRODUCT',.t.,.t.
**-- SAMPLE #2
**-- This sample shows you how to 1) activate a key (F5) to 2) call a
**-- separate program called backup.prg which in turn "RUNS" a BATCH file
**-- in DOS called Backup.bat (see below).
ON KEY LABEL F5 DO backup
**-- Sample #3
**-- Use this to move data with one keystroke while in the browse screen.
**-- the sample below will move data from a FIELD Called ACTIVITY1 (used
**-- to insert activity codes) to another field called ACTIVITY2, and
**-- move whatever information that was in ACTIVITY 2 to ACTIVITY3.
**-- This assumes that your data base has threee fields called ACTIVITY1,
**-- ACTIVITY2, and ACTIVITY3.
**-- Note: if you insert the key word ALL after REPLACE, all records
**-- in the data file would be changed.
**-- ON KEY LABEL CTRL+F3 REPLACE ALL ACTIVITY3 WITH ACTIVITY2, ACTIVITY2 WITH ACTIVITY1
**-- Sample #4
**-- Take the asterisk off the line below if you have a 1) REP (Sales
**-- Representative) file, 2) a field called REP for a sales rep code
**-- in your main data file, and 3) you want to access the proper REP Name/
**-- Phone number, etc. in Reports, Labels, Letters with this
**-- variable name:<<REP->repname>>, <<REP->repphone>>
IF file00='SAMPLE' &&name of your master file - You only want to call this when your using a file containing REP
IF FILE('REP.DBF')
=g_opnfl('REP','REP',.f.,.f.) &&.f.=open exclusively, .f.=open again (if already open)
SET ORDER TO TAG rep
SELECT &file00
SET RELATION TO rep INTO REP
ENDIF
ENDIF
**-- Sample #5 (Same as #4, but uses state.dbf file)
**-- Allows use of Illinois instead of IL, or Wisconsin instead of WI <<STATE->desc>>.
**-- or access to county names with <<STATE->county>>
*IF file00='SAMPLE' &&name of your master file - You only want to call this when your using a file containing STATE
*IF FILE('STATE.DBF')
*=g_opnfl('STATE','STATE',.f.,.f.)
*SET ORDER TO TAG state
*SELECT &file00
*SET RELATION TO state INTO STATE
*ENDIF
*ENDIF