Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Wizard generated forms add to child/parent popup window
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00056836
Message ID:
00056844
Views:
29
>I have created several tables, which are linked by a key value in the master table. I then used the Form Wizard to create a form for the master table. I subsequently added grids for the child tables, using the grid builders. The form executes correctly. However, when I click the Add button, a window pops up with three options: add to parent, Add to child, add to both. I would really like to avoid this and just add to parent, then put code in the grid doubleclick event to add to the child tables. How can I do this? I have tried selecting the correct tables, then append blank, then thisform.refresh, but this doesn't work.

In WIZSTYLE.VCX you'll find the classes gridaddrec and gridaddform. Make copies of these in your own class library, rename them with the RENAME CLASS command, then rip out the stuff you don't want. In your case, you may want to rip out the reference to "gridaddform" alltogether. Your own version of gridaddrec can just INSERT or APPEND a record in your parent, with your key value. Then it might call a method called "setdefaults" which would be blank in the class. Each instance of the class could contain code to fill in default values for fields on the form.
Previous
Reply
Map
View

Click here to load this message in the networking platform