How to Change Fields to Use Memory Variables, Not Aliases

ID: Q119792

2.5x 2.60 2.60a | 2.5x 2.60 2.60a | 2.5x 2.60a | 2.60

MS-DOS          | WINDOWS         | MACINTOSH  | UNIX

The information in this article applies to:

SUMMARY

This article explains how to change all variables from having aliases to memory variables. For example, suppose the field on the screen has CUSTOMER.CNO for input and M.CNO is wanted instead. There is no dialog box in the interface that allows the variables to be globally changed.

MORE INFORMATION

There are two ways to change the variables:

The following steps set up a sample screen and show how to implement the second option above.

 1. Open the CUSTOMER table that is located in the FoxPro TUTORIAL
    subdirectory.

 2. From the File menu, choose New, select the Screen radio button, and
    choose the New button.

 3. From the Screen menu, choose Quick Screen.

    A small window  with the title "Quick Screen" appears.

 4. Make sure that the Add Alias check box is selected.

 5. Choose OK.

 6. Double-click one of the fields. Note that "customer.<field name>"
    appears. Choose the Cancel button.

 7. Press CTRL+W to save the screen.

 8. Save the file as TEST.SCX, and save the environment when prompted.

 9. In the Command window, type the following command and press ENTER:

       USE test.scx

10. In the Command window, type the following command and press ENTER:

       REPLACE name WITH "m."+STRTRAN(name,"customer.","") FOR objtype=15

11. In the Command window, type the following command and press ENTER:

       USE

Open the TEST.SCX screen and note that instead of having CUSTOMER.CNO, CUSTOMER.STATE, CUSTOMER.YTDPURCH, the input for the fields on the screen are M.CNO, M.STATE, and M.YTDPURCH.

REFERENCES

Microsoft FoxPro 2.6 for MS-DOS "Update" page 4-32 and Microsoft FoxPro 2.6 for Windows "Developer's Guide" page A-32.

Additional reference words: FoxUnix FoxMac FoxDos FoxWin 2.50 2.50a 2.50b 2.50c 2.60 2.60a memvar KBCategory: KBSubcategory: FxenvMemory

Keywords          : kbcode FxenvMemory 
Version           : 2.5x 2.60 2.60a | 2.5x 2.60 2.60
Platform          : MACINTOSH MS-DOS UNIX WINDOWS

Last Reviewed: May 22, 1998