home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / database / 9293 < prev    next >
Encoding:
Text File  |  1993-01-21  |  1.8 KB  |  69 lines

  1. Newsgroups: comp.databases
  2. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!ms!weiss
  3. From: weiss@cs.wm.edu (David W. Weiss)
  4. Subject: dBASE IV problem
  5. Message-ID: <1993Jan21.212859.20703@cs.wm.edu>
  6. Sender: news@cs.wm.edu (News System)
  7. Nntp-Posting-Host: ga.cs.wm.edu
  8. Organization: The College of William and Mary
  9. Distribution: na
  10. Date: Thu, 21 Jan 1993 21:28:59 GMT
  11. Lines: 56
  12.  
  13.  
  14.  
  15. Following are a couple of procedures from a dBASE program
  16. I wrote. It is part of a screen where a user enters some
  17. information into memory variables. It issupposed to allow
  18. the user to hit F1 and get a pop-up window of possible values
  19. and then select one value from that window. It works great if 
  20. they just type a value directly into the field or type nothing
  21. in the field and just select a value using the pop-up window.
  22. However, if they start to type something in the field and then
  23. instead use the pop-up window and select a value the variable
  24. will contain the typed value instead of what was selected from
  25. the window. I think it has something to do with how the READ
  26. command works but I haven't been able to get around it. 
  27. Any suggestions or am I out of luck.
  28.  
  29.  
  30.  
  31. PROCEDURE Getrest
  32. ON KEY LABEL F1 DO FieldHelp
  33. @ 12,25 GET mLocality PICTURE "!!" ;
  34.   MESSAGE "Press <F1> to see Localitys lookup list" COLOR B/W
  35. READ
  36. ON KEY
  37. RETURN
  38.  
  39. PROCEDURE Fieldhelp
  40. USE Localitys
  41. DEFINE POPUP Locs FROM 11,28 TO 17,60 MESSAGE;
  42.   "Use up and down arrow keys to highlight menu choice and press <Enter>"
  43. n = 1
  44. SCAN
  45.     DEFINE BAR n OF Locs PROMPT Locality + " " + Loctext
  46.     n = n + 1
  47. ENDSCAN
  48. ON SELECTION POPUP Locs DO Locselect
  49. ACTIVATE POPUP Locs
  50. @ 12,25 SAY mLocality COLOR GR+/W
  51. CLOSE DATABASES
  52. RETURN
  53.  
  54. PROCEDURE Locselect
  55. GOTO BAR()
  56. mLocality = Locality
  57. DEACTIVATE POPUP
  58. RETURN
  59.  
  60.  
  61. -------------------------------------------------------
  62.  
  63. Thanks a lot,
  64.  
  65. Dave
  66. weiss@cs.wm.edu
  67.  
  68.  
  69.