home *** CD-ROM | disk | FTP | other *** search
- Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
- Path: sparky!uunet!paladin.american.edu!auvm!MCIMAIL.COM!0003081833
- Message-ID: <45921221171554/0003081833NA2EM@mcimail.com>
- Newsgroups: bit.listserv.dbase-l
- Date: Mon, 21 Dec 1992 17:15:00 GMT
- Sender: "Discussion on the use of the dBase language and related
- dialects" <DBASE-L@NMSUVM1.BITNET>
- From: "Anthony K. Lima" <0003081833@MCIMAIL.COM>
- Subject: RE: Using popup menus for record selection
- Lines: 32
-
- I've added a couple of comments. It looks to me like you're
- not changing work areas before you do the LOCATE IN FindRec.
- -- Tony Lima
-
- PROCEDURE PopMenu
- SELECT 2 && AVACMAIN.DBF
- * TL: Since the field name never changes, why not just
- * use it instead of all the complexity with the FIELD()
- * function and macro substitution?
- Mfield = FIELD(3) && last name field in AVACMAIN.DBF
- DEFINE POPUP GetRec FROM 7,58 TO 14,70 PROMPT FIELD &Mfield ;
- MESSAGE "Highlight and Press <ENTER> to make selection."
- ON SELECTION POPUP GetRec DO FindRec
- ACTIVATE POPUP GetRec
- RETURN && (EOP PopMenu)
-
- PROCEDURE FindRec
- GOTO BAR()
- Mlast=&Mfield
- Mssn=Ssn
- * TL: Here's the problem: You're not switching to a new
- * dbf before you do the LOCATE. You're LOCATEing in
- * AVACMAIN.DBF.
- LOCATE FOR Ssn=Mssn
- IF FOUND()
- Mname=TRIM(Last)+" "+TRIM(first)
- @ 9,32 SAY Mname && places first and last name on input screen
- ENDIF
- SELECT 1
- SAVE SCREEN TO SavScr
- DEACTIVATE POPUP
- RETURN && (EOP FindRec)
-