Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create New Form - No tables available
Message
From
12/11/2000 06:53:43
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00438761
Message ID:
00440768
Views:
11
Hi Mark,

Thank you for your time and info. I will try that. Its makes good sense.

Roland...
===============================================================================

>From what you explain, performance will not be affected. I, as do most, also have child forms that depend on a selected record in a parent form. What I do is either pass a parameter to the child form [the keyid of the table] or set an Application [global] object property with the value of the keyid.
>
>At the beginning of my application a create a public variable [goApp] which is a global object where I can AddProperty() and store values in those properties. In the past, we would have handled this by using public memory variables. We now create an object that is visible to all application objects. This global object is usually based on the custom class.
>
>public goApp
>goApp = newobject('AppMgr', 'AppManager.vcx')
>goApp.AddProperty('CustNo')
>
>* then in a customer lookup form [custlist.scx] before you call the customer details form --
>goApp.CustNo = 'customer.custno'
>do form Customer
>
>* in my case I have a method in my AppMgr class called DOFORM
>goApp.DoForm("Customer", "frmCustomer") && frmCustomer is the value of the form's Name property
>
>My DOFORM loops through the _screen.forms() collection to see if the form is already open. If it is, I just issue a oForm.Show(). Otherwise, I issue the DO FORM CUSTOMER. Example DOFORM code:
>lparameters tcForm, tcFormName
>if vartype(tcForm) <> "C"
>   return .f.
>endif
>tcForm = alltrim(tcForm)
>if empty(tcForm)
>   return .f.
>endif
>if vartype(tcFormName) = "C"
>   tcFormName = alltrim(upper(tcFormName))
>endif
>local llFound, i
>llFound = .f.
>i = 0
>if !empty(tcFormName)
>   for i = 1 to _screen.formcount
>      if upper(_screen.forms(i).name) = tcFormName
>         llFound = .t.
>         exit
>      endif
>   endfor
>endif
>if llFound
>   _screen.forms(i).Show()
>else
>   do form (tcForm)
>endif
>
>>Hi Mark,
>>
>>You are right. First form is private D.S./modaless and others are default D.S./modal. The reason is that the forms are all related (use the same tables) and 1st Form does the searching (finding the desired record(s)) and then displays the detailed info from record selected and prints it if desired.
>>
>>The new form has a new table added but uses almost all other tables and relationships.
>>
>>The thing is that I do not understand VFP well enough to make certain decisions relating to open/close of tables.
>>
>>I would like to have the tables only opened when the forms need them but I don't know what performance impact opening/closing 17 tables would have on the network when many users (10-30) are transversing form to form.
>>
>>A little program called Main.prg sets read events for all forms. Had problems getting the flow down to go from form to form keeping the same record pointer from the Main Form, to detail, to report (scope next 1).
>>
>>I could use auto open/auto close on each form, the relationships would be auto set, and then lookup the desired record by the primary key of the main table and all should be well, but don't know the performance impact on the network!!!!!!!
>>
>>Any suggestions?
>>
>>Thanks in advance!
>>Roland...
>>==============================================================================
>>>Sound like you are not using private datasessions if your main form DE opens all the tables. Design-wise this is bad. The beauty of using private data sessions in all your forms is that your forms can be independent of all other forms and can be instanciated multiple times. You should also only open the tables or views you need in each form. Each form, by having its own data session, can establish its own table relations and index orders without affections another forms tables relations and orders.
>>>
>>>>Hi,
>>>>
>>>>When I create a new form in my project and define new textbox etc.; I have no tables to choose fields from.
>>>>
>>>>The Database contains all the tables and relationships and the Main Form dataenviroment has all the tables and relationships.
>>>>
>>>>What do I need to do so that when I create a new form all the tables are available to choose from.
>>>>
>>>>ALSO
>>>>
>>>>There's a single table Wizard and a Wizard with a parent table and a child table that creates a grid, but no Multiple tables wizards.
>>>>
>>>>Are there any other Wizards that let you create a form with more than one table with relationships? If so, Where!
>>>>
>>>>Thanks in advance!
>>>>Roland...
Previous
Reply
Map
View

Click here to load this message in the networking platform