Microsoft KB Archive/134313

From BetaArchive Wiki
Knowledge Base


Article ID: 134313

Article Last Modified on 2/15/2000



APPLIES TO

  • Microsoft Visual FoxPro 3.0 Standard Edition



This article was previously published under Q134313

SUMMARY

Visual FoxPro has the ability to refresh an object on a form based on a logical field in a table.

MORE INFORMATION

Step-by-Step Procedure

  1. Create a new .dbf file called Junk with a logical field named Logic.
  2. Enter two or three records with True (.T.) valuses in the Logic field and two or three records with False (.F.) values in the Logic field.
  3. Issue the following command in the Command window:

       CREATE FORM Test
  4. Select the command button object from the Form Controls toolbar, and place it on the form.
  5. In the Refresh property for th command button, type:

       THIS.VISIBLE=Junk.Logic
                            

    This will cause the object to be visible or not visible based upon the value in the Junk.dbf table.

  6. Create another command button on the form.
  7. Double-click the button and in the click event for this button, type the following two commands:

       SKIP              && move the record pointer
       THISFORM.REFRESH  && refresh the screen
  8. Click the exclamation mark on the toolbar to save and run the form.
  9. Click the second command button and note how the first command button appears and disappears based on the value of the logical field in the table.



Additional query words: 3.00 VFoxWin

Keywords: KB134313