ID: Q97642
The information in this article applies to:
When you create a list popup in FoxPro using the PROMPT FILES clause, the entire path is not stored in the variable.
To have the entire path returned, do the following:
1. In the setup code of the screen, define a popup with the PROMPT FILES
clause. For example:
DEFINE POPUP popfile PROMPT FILES LIKE *.dbf
2. In the setup code, define as character the variable that the list will
be using. Also, define a character variable to which the entire path
will be stored. For example:
var='' && List variable
entire='' && Variable for entire path
3. To create the list, do one of the following, depending on which platform
you are using:
- In FoxPro for MS-DOS, position the cursor on the screen in the
place where you want the list to appear. From the Screen menu,
choose List, select From Popup, and type "popfile" (without the
quotation marks) as the popup name. In the Variable box, type
"var" (without the quotation marks).
- In FoxPro for Windows, click the list tool, then click in the
Screen Design window where you want the list to appear and drag
the list to the desired size. The List dialog box will open. In
the dialog box, select From Popup, and type "popfile" (without
the quotation marks) as the popup name. In the Variable box,
type "var" (without the quotation marks).
4. In the Valid procedure, type the following code:
entire=PRMBAR("popfile", 2)+var
5. The variable called "entire" now contains the entire path to the
selected file, as well as the filename. To verify this, include the
following statement after the command given in step 4:
WAIT WINDOW entire
Additional reference words: FoxDos FoxWin FoxMac FoxUnix 2.00 2.50 2.50a
2.50b 2.60 2.60a pop-up fullpath full-path
KBCategory: kbprg
KBSubcategory: FxprgGeneral
Last Reviewed: March 16, 1996