tables closed and setfocus 
Author Message
 tables closed and setfocus

When I do a form such as "DO form merge NOREAD"
from within a VFP 7.0 form event, when form "merge" is
executed, a table which has been previously "opened" is now
"closed".  Therew has been not intervening "use" or Close
...." commands issued.

In a VFP7.0 form, when a text box "losefocus" event occurs,
I have code to ascertain the validity of that particular
enter.  If the entry is in error I clear the text box, set
the focus to it, and refresh the form.  The cursos is not
being positioned back to that particular text box.

Both of above are from the same application.



Tue, 30 Aug 2005 02:52:31 GMT  
 tables closed and setfocus
The "NODEFAULT" statement took care of the
LostFocus/SetFocus problem.  It doesn't matter which
setting is used for the AutoCloseTables property of the
DataEnvironment, it still can't find the alias.

Quote:
>-----Original Message-----
>Hello,

>1. could it be that DataEnvironment of the second form
contains the table
>and AutoCloseTables property of the DataEnvironment is set
to .T.

>2. issue a NODEFAULT in the lostfocus

>e.g.

>FUNCTION LostFocus
>    IF !INLIST(THIS.Value,1,2,3,4) && validation
>        NODEFAULT
>        THIS.Value = ""
>    ENDIF
>ENDFUNC



>> When I do a form such as "DO form merge NOREAD"
>> from within a VFP 7.0 form event, when form "merge" is
>> executed, a table which has been previously "opened" is now
>> "closed".  Therew has been not intervening "use" or Close
>> ...." commands issued.

>> In a VFP7.0 form, when a text box "losefocus" event occurs,
>> I have code to ascertain the validity of that particular
>> enter.  If the entry is in error I clear the text box, set
>> the focus to it, and refresh the form.  The cursos is not
>> being positioned back to that particular text box.

>> Both of above are from the same application.

>.



Tue, 30 Aug 2005 03:34:29 GMT  
 tables closed and setfocus
The "NODEFAULT" statement took care of the
LostFocus/SetFocus problem.  It doesn't matter which
setting is used for the AutoCloseTables property of the
DataEnvironment, it still can't find the alias.

Quote:
>-----Original Message-----
>Hello,

>1. could it be that DataEnvironment of the second form
contains the table
>and AutoCloseTables property of the DataEnvironment is set
to .T.

>2. issue a NODEFAULT in the lostfocus

>e.g.

>FUNCTION LostFocus
>    IF !INLIST(THIS.Value,1,2,3,4) && validation
>        NODEFAULT
>        THIS.Value = ""
>    ENDIF
>ENDFUNC



>> When I do a form such as "DO form merge NOREAD"
>> from within a VFP 7.0 form event, when form "merge" is
>> executed, a table which has been previously "opened" is now
>> "closed".  Therew has been not intervening "use" or Close
>> ...." commands issued.

>> In a VFP7.0 form, when a text box "losefocus" event occurs,
>> I have code to ascertain the validity of that particular
>> enter.  If the entry is in error I clear the text box, set
>> the focus to it, and refresh the form.  The cursos is not
>> being positioned back to that particular text box.

>> Both of above are from the same application.

>.



Tue, 30 Aug 2005 03:34:27 GMT  
 tables closed and setfocus
Hi Joe:

Issue 2. LostFocus problem: Once you are in the LostFocus event, you have
left the control.  The NODEFAULT prevents the default behavior, which is to
move to the next field.

I hope this helps.

This posting is provided "AS IS" with no warranties, and confers no rights.

Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell

Quote:
>Hello,
>1. could it be that DataEnvironment of the second form contains the table
>and AutoCloseTables property of the DataEnvironment is set to .T.
>2. issue a NODEFAULT in the lostfocus
>e.g.
>FUNCTION LostFocus
>    IF !INLIST(THIS.Value,1,2,3,4) && validation
>        NODEFAULT
>        THIS.Value = ""
>    ENDIF
>ENDFUNC


> When I do a form such as "DO form merge NOREAD"
> from within a VFP 7.0 form event, when form "merge" is
> executed, a table which has been previously "opened" is now
> "closed".  Therew has been not intervening "use" or Close
> ...." commands issued.

> In a VFP7.0 form, when a text box "losefocus" event occurs,
> I have code to ascertain the validity of that particular
> enter.  If the entry is in error I clear the text box, set
> the focus to it, and refresh the form.  The cursos is not
> being positioned back to that particular text box.

> Both of above are from the same application.



Tue, 30 Aug 2005 03:32:48 GMT  
 tables closed and setfocus
The "NODEFAULT" statement took care of the
LostFocus/SetFocus problem.  It doesn't matter which
setting is used for the AutoCloseTables property of the
DataEnvironment, it still can't find the alias.

Quote:
>-----Original Message-----
>Hello,

>1. could it be that DataEnvironment of the second form
contains the table
>and AutoCloseTables property of the DataEnvironment is set
to .T.

>2. issue a NODEFAULT in the lostfocus

>e.g.

>FUNCTION LostFocus
>    IF !INLIST(THIS.Value,1,2,3,4) && validation
>        NODEFAULT
>        THIS.Value = ""
>    ENDIF
>ENDFUNC



>> When I do a form such as "DO form merge NOREAD"
>> from within a VFP 7.0 form event, when form "merge" is
>> executed, a table which has been previously "opened" is now
>> "closed".  Therew has been not intervening "use" or Close
>> ...." commands issued.

>> In a VFP7.0 form, when a text box "losefocus" event occurs,
>> I have code to ascertain the validity of that particular
>> enter.  If the entry is in error I clear the text box, set
>> the focus to it, and refresh the form.  The cursos is not
>> being positioned back to that particular text box.

>> Both of above are from the same application.

>.



Tue, 30 Aug 2005 03:34:29 GMT  
 tables closed and setfocus
The "NODEFAULT" statement took care of the
LostFocus/SetFocus problem.  It doesn't matter which
setting is used for the AutoCloseTables property of the
DataEnvironment, it still can't find the alias.

Quote:
>-----Original Message-----
>Hello,

>1. could it be that DataEnvironment of the second form
contains the table
>and AutoCloseTables property of the DataEnvironment is set
to .T.

>2. issue a NODEFAULT in the lostfocus

>e.g.

>FUNCTION LostFocus
>    IF !INLIST(THIS.Value,1,2,3,4) && validation
>        NODEFAULT
>        THIS.Value = ""
>    ENDIF
>ENDFUNC



>> When I do a form such as "DO form merge NOREAD"
>> from within a VFP 7.0 form event, when form "merge" is
>> executed, a table which has been previously "opened" is now
>> "closed".  Therew has been not intervening "use" or Close
>> ...." commands issued.

>> In a VFP7.0 form, when a text box "losefocus" event occurs,
>> I have code to ascertain the validity of that particular
>> enter.  If the entry is in error I clear the text box, set
>> the focus to it, and refresh the form.  The cursos is not
>> being positioned back to that particular text box.

>> Both of above are from the same application.

>.



Tue, 30 Aug 2005 03:34:28 GMT  
 tables closed and setfocus
The "NODEFAULT" statement took care of the
LostFocus/SetFocus problem.  It doesn't matter which
setting is used for the AutoCloseTables property of the
DataEnvironment, it still can't find the alias.

Quote:
>-----Original Message-----
>Hello,

>1. could it be that DataEnvironment of the second form
contains the table
>and AutoCloseTables property of the DataEnvironment is set
to .T.

>2. issue a NODEFAULT in the lostfocus

>e.g.

>FUNCTION LostFocus
>    IF !INLIST(THIS.Value,1,2,3,4) && validation
>        NODEFAULT
>        THIS.Value = ""
>    ENDIF
>ENDFUNC



>> When I do a form such as "DO form merge NOREAD"
>> from within a VFP 7.0 form event, when form "merge" is
>> executed, a table which has been previously "opened" is now
>> "closed".  Therew has been not intervening "use" or Close
>> ...." commands issued.

>> In a VFP7.0 form, when a text box "losefocus" event occurs,
>> I have code to ascertain the validity of that particular
>> enter.  If the entry is in error I clear the text box, set
>> the focus to it, and refresh the form.  The cursos is not
>> being positioned back to that particular text box.

>> Both of above are from the same application.

>.



Tue, 30 Aug 2005 03:34:29 GMT  
 tables closed and setfocus
The "NODEFAULT" statement took care of the
LostFocus/SetFocus problem.  It doesn't matter which
setting is used for the AutoCloseTables property of the
DataEnvironment, it still can't find the alias.

Quote:
>-----Original Message-----
>Hello,

>1. could it be that DataEnvironment of the second form
contains the table
>and AutoCloseTables property of the DataEnvironment is set
to .T.

>2. issue a NODEFAULT in the lostfocus

>e.g.

>FUNCTION LostFocus
>    IF !INLIST(THIS.Value,1,2,3,4) && validation
>        NODEFAULT
>        THIS.Value = ""
>    ENDIF
>ENDFUNC



>> When I do a form such as "DO form merge NOREAD"
>> from within a VFP 7.0 form event, when form "merge" is
>> executed, a table which has been previously "opened" is now
>> "closed".  Therew has been not intervening "use" or Close
>> ...." commands issued.

>> In a VFP7.0 form, when a text box "losefocus" event occurs,
>> I have code to ascertain the validity of that particular
>> enter.  If the entry is in error I clear the text box, set
>> the focus to it, and refresh the form.  The cursos is not
>> being positioned back to that particular text box.

>> Both of above are from the same application.

>.



Tue, 30 Aug 2005 03:34:28 GMT  
 tables closed and setfocus
The "NODEFAULT" statement took care of the
LostFocus/SetFocus problem.  It doesn't matter which
setting is used for the AutoCloseTables property of the
DataEnvironment, it still can't find the alias.

Quote:
>-----Original Message-----
>Hello,

>1. could it be that DataEnvironment of the second form
contains the table
>and AutoCloseTables property of the DataEnvironment is set
to .T.

>2. issue a NODEFAULT in the lostfocus

>e.g.

>FUNCTION LostFocus
>    IF !INLIST(THIS.Value,1,2,3,4) && validation
>        NODEFAULT
>        THIS.Value = ""
>    ENDIF
>ENDFUNC



>> When I do a form such as "DO form merge NOREAD"
>> from within a VFP 7.0 form event, when form "merge" is
>> executed, a table which has been previously "opened" is now
>> "closed".  Therew has been not intervening "use" or Close
>> ...." commands issued.

>> In a VFP7.0 form, when a text box "losefocus" event occurs,
>> I have code to ascertain the validity of that particular
>> enter.  If the entry is in error I clear the text box, set
>> the focus to it, and refresh the form.  The cursos is not
>> being positioned back to that particular text box.

>> Both of above are from the same application.

>.



Tue, 30 Aug 2005 03:34:28 GMT  
 tables closed and setfocus
The "NODEFAULT" statement took care of the
LostFocus/SetFocus problem.  It doesn't matter which
setting is used for the AutoCloseTables property of the
DataEnvironment, it still can't find the alias.

Quote:
>-----Original Message-----
>Hello,

>1. could it be that DataEnvironment of the second form
contains the table
>and AutoCloseTables property of the DataEnvironment is set
to .T.

>2. issue a NODEFAULT in the lostfocus

>e.g.

>FUNCTION LostFocus
>    IF !INLIST(THIS.Value,1,2,3,4) && validation
>        NODEFAULT
>        THIS.Value = ""
>    ENDIF
>ENDFUNC



>> When I do a form such as "DO form merge NOREAD"
>> from within a VFP 7.0 form event, when form "merge" is
>> executed, a table which has been previously "opened" is now
>> "closed".  Therew has been not intervening "use" or Close
>> ...." commands issued.

>> In a VFP7.0 form, when a text box "losefocus" event occurs,
>> I have code to ascertain the validity of that particular
>> enter.  If the entry is in error I clear the text box, set
>> the focus to it, and refresh the form.  The cursos is not
>> being positioned back to that particular text box.

>> Both of above are from the same application.

>.



Tue, 30 Aug 2005 03:34:38 GMT  
 tables closed and setfocus
The "NODEFAULT" statement took care of the
LostFocus/SetFocus problem.  It doesn't matter which
setting is used for the AutoCloseTables property of the
DataEnvironment, it still can't find the alias.

Quote:
>-----Original Message-----
>Hello,

>1. could it be that DataEnvironment of the second form
contains the table
>and AutoCloseTables property of the DataEnvironment is set
to .T.

>2. issue a NODEFAULT in the lostfocus

>e.g.

>FUNCTION LostFocus
>    IF !INLIST(THIS.Value,1,2,3,4) && validation
>        NODEFAULT
>        THIS.Value = ""
>    ENDIF
>ENDFUNC



>> When I do a form such as "DO form merge NOREAD"
>> from within a VFP 7.0 form event, when form "merge" is
>> executed, a table which has been previously "opened" is now
>> "closed".  Therew has been not intervening "use" or Close
>> ...." commands issued.

>> In a VFP7.0 form, when a text box "losefocus" event occurs,
>> I have code to ascertain the validity of that particular
>> enter.  If the entry is in error I clear the text box, set
>> the focus to it, and refresh the form.  The cursos is not
>> being positioned back to that particular text box.

>> Both of above are from the same application.

>.



Tue, 30 Aug 2005 03:34:29 GMT  
 tables closed and setfocus
The "NODEFAULT" statement took care of the
LostFocus/SetFocus problem.  It doesn't matter which
setting is used for the AutoCloseTables property of the
DataEnvironment, it still can't find the alias.

Quote:
>-----Original Message-----
>Hello,

>1. could it be that DataEnvironment of the second form
contains the table
>and AutoCloseTables property of the DataEnvironment is set
to .T.

>2. issue a NODEFAULT in the lostfocus

>e.g.

>FUNCTION LostFocus
>    IF !INLIST(THIS.Value,1,2,3,4) && validation
>        NODEFAULT
>        THIS.Value = ""
>    ENDIF
>ENDFUNC



>> When I do a form such as "DO form merge NOREAD"
>> from within a VFP 7.0 form event, when form "merge" is
>> executed, a table which has been previously "opened" is now
>> "closed".  Therew has been not intervening "use" or Close
>> ...." commands issued.

>> In a VFP7.0 form, when a text box "losefocus" event occurs,
>> I have code to ascertain the validity of that particular
>> enter.  If the entry is in error I clear the text box, set
>> the focus to it, and refresh the form.  The cursos is not
>> being positioned back to that particular text box.

>> Both of above are from the same application.

>.



Tue, 30 Aug 2005 03:34:28 GMT  
 tables closed and setfocus
Hi Joe:

Why all the duplicate messages?

Have you run the application through the De{*filter*} and traced the code?  
This may tell you what line of code is closing the table or indicate some
other reason why the alias is not found.  At least it gives you a place to
start looking for the cause of the problem.

I hope this helps.

This posting is provided "AS IS" with no warranties, and confers no rights.

Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell

Quote:
>The "NODEFAULT" statement took care of the
>LostFocus/SetFocus problem.  It doesn't matter which
>setting is used for the AutoCloseTables property of the
>DataEnvironment, it still can't find the alias.
>-----Original Message-----
>Hello,

>1. could it be that DataEnvironment of the second form
contains the table
>and AutoCloseTables property of the DataEnvironment is set
to .T.

>2. issue a NODEFAULT in the lostfocus

>e.g.

>FUNCTION LostFocus
>    IF !INLIST(THIS.Value,1,2,3,4) && validation
>        NODEFAULT
>        THIS.Value = ""
>    ENDIF
>ENDFUNC



>> When I do a form such as "DO form merge NOREAD"
>> from within a VFP 7.0 form event, when form "merge" is
>> executed, a table which has been previously "opened" is now
>> "closed".  Therew has been not intervening "use" or Close
>> ...." commands issued.

>> In a VFP7.0 form, when a text box "losefocus" event occurs,
>> I have code to ascertain the validity of that particular
>> enter.  If the entry is in error I clear the text box, set
>> the focus to it, and refresh the form.  The cursos is not
>> being positioned back to that particular text box.

>> Both of above are from the same application.

>.



Tue, 30 Aug 2005 04:14:15 GMT  
 tables closed and setfocus
Joe,

Is the new form in the same datasession as before?

Andrew R.


Quote:
> When I do a form such as "DO form merge NOREAD"
> from within a VFP 7.0 form event, when form "merge" is
> executed, a table which has been previously "opened" is now
> "closed".  Therew has been not intervening "use" or Close
> ...." commands issued.

> In a VFP7.0 form, when a text box "losefocus" event occurs,
> I have code to ascertain the validity of that particular
> enter.  If the entry is in error I clear the text box, set
> the focus to it, and refresh the form.  The cursos is not
> being positioned back to that particular text box.

> Both of above are from the same application.



Tue, 30 Aug 2005 19:23:46 GMT  
 
 [ 14 post ] 

 Relevant Pages 

1. Closing project manager closes open tables -why?

2. setfocus in keypress of form causes form to not close

3. No table is open in the current work area when setfocus

4. SetFocus seems to break relationship between tables

5. c0000005 when closing table

6. can't close tables with FOR loop

7. Close tables opened by query ?

8. Closing VFP tables through ODBC.

9. closing tables opened by select-sql

10. Closing tables after running queries

11. close a single table

12. How to close View base tables ?

 

 
Powered by phpBB® Forum Software