home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases
- Path: sparky!uunet!ukma!gatech!emory!swrinde!ringer!lonestar.utsa.edu!moursand
- From: moursand@lonestar.utsa.edu (Bowen M. Moursund)
- Subject: Re: dBASE IV problem
- Message-ID: <1993Jan26.231235.27322@ringer.cs.utsa.edu>
- Sender: news@ringer.cs.utsa.edu
- Nntp-Posting-Host: lonestar.utsa.edu
- Organization: University of Texas at San Antonio
- References: <1993Jan21.212859.20703@cs.wm.edu>
- Distribution: na
- Date: Tue, 26 Jan 1993 23:12:35 GMT
- Lines: 56
-
- In article <1993Jan21.212859.20703@cs.wm.edu> weiss@cs.wm.edu (David W. Weiss) writes:
- >
- >
- >Following are a couple of procedures from a dBASE program
- >I wrote. It is part of a screen where a user enters some
- >information into memory variables. It issupposed to allow
- >the user to hit F1 and get a pop-up window of possible values
- >and then select one value from that window. It works great if
- >they just type a value directly into the field or type nothing
- >in the field and just select a value using the pop-up window.
- >However, if they start to type something in the field and then
- >instead use the pop-up window and select a value the variable
- >will contain the typed value instead of what was selected from
- >the window. I think it has something to do with how the READ
- >command works but I haven't been able to get around it.
- >Any suggestions or am I out of luck.
- >
- >
- >
- >PROCEDURE Getrest
- >ON KEY LABEL F1 DO FieldHelp
- >@ 12,25 GET mLocality PICTURE "!!" ;
- > MESSAGE "Press <F1> to see Localitys lookup list" COLOR B/W
- >READ
- >ON KEY
- >RETURN
- >
- >PROCEDURE Fieldhelp
- >USE Localitys
- >DEFINE POPUP Locs FROM 11,28 TO 17,60 MESSAGE;
- > "Use up and down arrow keys to highlight menu choice and press <Enter>"
- >n = 1
- >SCAN
- > DEFINE BAR n OF Locs PROMPT Locality + " " + Loctext
- > n = n + 1
- >ENDSCAN
- >ON SELECTION POPUP Locs DO Locselect
- >ACTIVATE POPUP Locs
- >@ 12,25 SAY mLocality COLOR GR+/W
- >CLOSE DATABASES
- >RETURN
- >
- >PROCEDURE Locselect
- >GOTO BAR()
- >mLocality = Locality
- >DEACTIVATE POPUP
- >RETURN
-
- Dave: Try something like this:
-
- PROCEDURE LocSelect
- keyboard chr(26)+chr(25)+right(prompt(),2)
- deactivate popup
- RETURN
-
-
-