I'm having trouble using the same table in two forms 
Author Message
 I'm having trouble using the same table in two forms

I need to know how to handle the following situation: I have one form
whose data environment includes the table ADDR (a list of addresses).
That form "calls" a second form that also needs to use that same table
to look up some information; this second form is also occasionally
"called" directly (i.e., not from the first form). If I put ADDR into
the data environment of the second form and call this form directly from
the command window everything works OK; but when I call if from the
first form I get weird error messages when I try to LOCATE a record in
the ADDR table; if I tell it to IGNORE the error things work, but I'm
obviously doing something wrong. I have tried everything that I can
think of (USE ADDR AGAIN IN 0 in the second form) without success. If
anyone could suggest how to handle this situation, I'd be very grateful.

-Everett Fee



Thu, 09 Aug 2001 03:00:00 GMT  
 I'm having trouble using the same table in two forms
Make the second form a separate datasession, and DataEnvironment, by setting
the form's DataSession property to 2, Private.
-Anders
Quote:

>I need to know how to handle the following situation: I have one form
>whose data environment includes the table ADDR (a list of addresses).
>That form "calls" a second form that also needs to use that same table
>to look up some information; this second form is also occasionally
>"called" directly (i.e., not from the first form). If I put ADDR into
>the data environment of the second form and call this form directly from
>the command window everything works OK; but when I call if from the
>first form I get weird error messages when I try to LOCATE a record in
>the ADDR table; if I tell it to IGNORE the error things work, but I'm
>obviously doing something wrong. I have tried everything that I can
>think of (USE ADDR AGAIN IN 0 in the second form) without success. If
>anyone could suggest how to handle this situation, I'd be very grateful.

>-Everett Fee



Thu, 09 Aug 2001 03:00:00 GMT  
 I'm having trouble using the same table in two forms
And remember that when the second form is called from
the first, it will not "inherit" the first's DE when
it has a private DataSession.  This can cause confusing
results if you're used to always using the default
DataSession.

-- TRW

Quote:

> Make the second form a separate datasession, and DataEnvironment, by setting
> the form's DataSession property to 2, Private.
> -Anders


> >I need to know how to handle the following situation: I have one form
> >whose data environment includes the table ADDR (a list of addresses).
> >That form "calls" a second form that also needs to use that same table
> >to look up some information; this second form is also occasionally
> >"called" directly (i.e., not from the first form). If I put ADDR into
> >the data environment of the second form and call this form directly from
> >the command window everything works OK; but when I call if from the
> >first form I get weird error messages when I try to LOCATE a record in
> >the ADDR table; if I tell it to IGNORE the error things work, but I'm
> >obviously doing something wrong. I have tried everything that I can
> >think of (USE ADDR AGAIN IN 0 in the second form) without success. If
> >anyone could suggest how to handle this situation, I'd be very grateful.

> >-Everett Fee



Thu, 09 Aug 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Having trouble switching DBC's in a form

2. Having trouble executing a batch using sql pass through

3. having troubles editin memo in top level form

4. Two forms using same tables.

5. Join two 'identical' tables

6. using form class w/o having to create formset

7. Having trouble updating a 1-Many child browse.

8. Having trouble opening a database obtained from GETFILE command

9. Having trouble with SET PRINTER TO

10. Still having trouble with INSERT INTO

11. Foxpro 2.6 for Mac having trouble launching----HELP

12. Still having trouble with SET RELATION

 

 
Powered by phpBB® Forum Software