home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / b / bbdo21s.zip / CUSTOM.PRG < prev    next >
Text File  |  1993-03-08  |  3KB  |  64 lines

  1. *****************************************************************************
  2. **-- Copyright 1993 B&B Systems DOALL                                       *
  3. **-- You can modify this file anyway you want                               *
  4. **-- After making ANY changes here, this file needs to be                   *
  5. **-- compiled with FoxPro to make an .FXP file.                             *
  6. *****************************************************************************
  7.  
  8. **-- SAMPLE #1
  9. **-- The line below will search for a data base file called
  10. **-- Product.dbf, after entering <CTRL-F2>.  If found it will be displayed
  11. **-- on the screen.  
  12. ON KEY LABEL CTRL+F2 DO filelook WITH 'PRODUCT',.t.,.t.
  13.  
  14.  
  15.  
  16. **-- SAMPLE #2
  17. **-- This sample shows you how to 1) activate a key (F5) to 2) call a 
  18. **-- separate program called backup.prg which in turn "RUNS" a BATCH file
  19. **-- in DOS called Backup.bat (see below).
  20. ON KEY LABEL F5 DO backup
  21.  
  22.  
  23. **-- SAMPLE #3
  24. **-- This sample activates a key (F4) to call the phone program to 
  25. **-- dial the phone (using any fields in your data file with "PHONE"
  26. **-- in the name), ONE RECORD at a time. 
  27. *ON KEY LABEL F4 DO phone WITH 'ONE'
  28.  
  29.  
  30. **-- SAMPLE #4
  31. **-- This sample activates a key (F4) to call the phone program to 
  32. **-- dial the phone (using any fields in your data file with "PHONE"
  33. **-- in the name), FOR ALL SELECTED RECORDS.  If you want to use this 
  34. **-- function instead of the one above, asterisk(*) the one above, and
  35. **-- remove the asterisk here.
  36. ON KEY LABEL F4 DO phone WITH 'ALL'
  37.  
  38.  
  39.  
  40. **-- Sample #5
  41. **-- Use this to move data with one keystroke while in the browse screen.
  42. **-- the sample below will move data from a FIELD Called ACTIVITY1 (used 
  43. **-- to insert activity codes) to another field called ACTIVITY2, and
  44. **-- move whatever information that was in ACTIVITY 2 to ACTIVITY3. 
  45. **-- This assumes that your data base has threee fields called ACTIVITY1,
  46. **-- ACTIVITY2, and ACTIVITY3.
  47. **-- Note: if you insert the key word ALL after REPLACE, all records
  48. **-- in the data file would be changed.
  49. **-- ON KEY LABEL CTRL+F3 REPLACE ALL ACTIVITY3 WITH ACTIVITY2, ACTIVITY2 WITH ACTIVITY1  
  50.  
  51.  
  52. **-- Sample #6
  53. **-- Take the asterisk off the line below if you have a 1) REP (Sales 
  54. **-- Representative) file, 2) a field called REP for a sales rep code
  55. **-- in your main data file, and 3) you want to access the proper REP Name/
  56. **-- Phone number, etc. in Reports, Labels, Letters with this 
  57. **-- variable name:<<REP->repname>>
  58. *IF FILE('REP.DBF')
  59. *=g_opnfl('REP','REP',.f.,.f.)
  60. *SET ORDER TO TAG rep
  61. *SELECT &file00
  62. *SET RELATION TO rep INTO REP
  63. *ENDIF
  64.