Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Private Data Session 3

Status
Not open for further replies.

fkwong

Programmer
Jul 5, 2002
65
US
For example, I have a form (form1) and a second form (form2), both of them can be called from the menu as seperate form that perform different functions. Both forms open and close tables, setting variables independently but do have some identical tables, alias and variable names.

Now, I have the need to call "form2" from "form1". The "form1" is the customer information in nature and "form2" is the transactions in nature. But they can be tie together by the customer ID. Instead of spending tons of hours to modify the existing forms. I have add a botton in the "form1" to call "form2" (DO form2 WITH cUSTid). Since these forms are using some identical tables and is very difficult to manage what is open and close, I try to use the "Provate Data Session" in both forms but run into issues.

One of the first problem is when I run "form1" from the menu, it shows all the FoxPro environment information on the form and mass up the entire form. Can someone give me advice of how to solve my problem and what is the appropriate way to address my needs?

Thanks in advance.
 
I'm not sure what you mean exactly by messing up the form but try...

Set console off

and/or

Set talk off

...before you go into form1.

With both forms set to private you can be sure that only the tables you have in the dataenvironment are open when you first come into whichever form, at least in the current datasession, if you want to access other tables you will have to switch datasessions. I hope I made sense. Slighthaze = NULL
 
[/i]One of the first problem is when I run "form1" from the menu, it shows all the FoxPro environment information on the form and mass up the entire form. Can someone give me advice of how to solve my problem and what is the appropriate way to address my needs?[/i]

Since you are using a Private Datasession, the settings need to be reset for each form. Reset the SET TALK to OFF, in the load of the form.


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Hi Fkwong,

Each Dataenvironment has its own scession.
SET TALK OFF and such specific SET COMMANDS need to be put in each of these.
DatEnvironment.BeforeOpenTables
SET TALK OFF

This will solve your problem :) ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top