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
- Create a new .dbf file called Junk with a logical field named Logic.
- 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.
Issue the following command in the Command window:
CREATE FORM Test
- Select the command button object from the Form Controls toolbar, and place it on the form.
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.
- Create another command button on the form.
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
- Click the exclamation mark on the toolbar to save and run the form.
- 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