>
>Also, I have two variables I use in each form to keep track of whether or
>not I'm in adding mode or edit mode.  They're called Adding and Editing.
>When I open that second form then close it to return to the first form
>(which is still open), I lose Adding and Editing since I release them when
>closing each form.  I've looked into Public, Private and Local, but am not
>seeing the proper way to keep my Adding and Editing variables alive and
>unique to each form I have open.  What do I need to look for there?


To keep them unique to each form, you want to use custom form properties 
instead of variables. With your form open in the Form Designer, choose "New 
Property" from the Form menu. Create properties called "Adding" and 
"Editing". Then in the appropriate methods, reference THISFORM.Adding and 
THISFORM.Editing.

As for dealing with tables opening and closing--in the long run your best 
bet is to abandon the form DataEnvironment. Instead, create your own 
nonvisual data classes. You can opt to instantiate these globally when the 
application starts, or you can hang them onto the forms.

Ken Dibble
www.stic-cil.org



_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to