UNCONF: PRB:GETS Disabled When All Records Are Deleted (119353)



The information in this article applies to:

  • Microsoft FoxPro for Windows 2.6

This article was previously published under Q119353
*****************************************************************
**                          - WARNING -                        **
**    THE INFORMATION BELOW IS PRELIMINARY AND HAS NOT BEEN    **
**    CONFIRMED, EDITED OR TESTED BY MICROSOFT.  USE ONLY      **
**    WITH DISCRETION.                                         **
*****************************************************************
		

SYMPTOMS

All data-entry fields (gets) are disabled when all records are deleted from a screen that was created through the ScreenWizard.

CAUSE

The CASE structure that is used in the ScreenWizard disables the GET fields and doesn't enable them when the ADD push-button is selected.

Steps to Reproduce Behavior

  1. Enter the following into the Command window to create a new table:
       CREATE TABLE DATA (code1 c(1), code2 c(1), code3 c(1))
    
       INSERT INTO DATA (code1, code2, code3) ;
       VALUES ("A","B","C")
    
       INSERT INTO DATA (code1, code2, code3) ;
       VALUES ("B","C","A")
    
       INSERT INTO DATA (code1, code2, code3) ;
       VALUES ("C","A","B")
    
       INSERT INTO DATA (code1, code2, code3) ;
       VALUES ("A","C","A")
    						
  2. Run the ScreenWizard using the table called DATA.DBF. Add all the fields;no sorting, choose 'Save and run screen'. Name the screen DATA.SCX.
  3. On the new screen select the DELETE push-button. Delete the four(4) records inserted. When the last record is deleted, the ADD and CLOSE push-buttons will be active.
  4. Push the ADD push-button and try to enter something into the fields.
All the get fields are disabled.

RESOLUTION

Add the following line to the WHEN snippet for the ADD button:
   SHOW GETS ENABLE
				
or, close and reopen the screen.

Modification Type:MajorLast Reviewed:2/12/2000
Keywords:KB119353