Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Wizard output of One To Many Relation Form
Message
 
To
21/07/2002 06:58:36
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00680862
Message ID:
00680877
Views:
18
Hi Anand,

The form to which you refer is in the wizstyle base clase. It is called "tblbtns" and it contains all the navigation buttons. You might want to take a look at "tblbtns" in the wizstyle class as it has a ton of code in it, and much can be learned by examining it. You can also place "set step on" in the cmdAdd button in your form, and it will call the debugger allowing you to step through the base code one line at a time. Once you have an understanding of the code in the tblbtns object, you can subclass it by placing your own custom code in the buttons, or you can paste the parent code into the correspond method/event in your form and modify it their. In this way you would not disturbe the code in the parent class. I would recommend the the code in the parent class not be disturbed. Any code placed in your child form would run instead of the base class code unless you issued a "do default" command in the child form. Also you might want to take a look at the nodefault() command.

At this time VFP does not have an auto increment, so you will need to provide custom code to assign unique parent table Keys. Auto increment will be implemented in VFP8.

If you really want to go first class, you could place the parent and child tables in the database container and set up a persistent relation between them. Then enable buffering in your form. Also, you can run a menu option in the DBC to generate the stored procedures and insert, delete, update trigger necessary to enforce referential integrity between your tables. It is very easy to do.
Leland F. Jackson, CPA
Software - Master (TM)
smvfp@mail.smvfp.com
Software Master TM
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform