Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VMP4, adding/deleting/saving action.
Message
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00450015
Message ID:
00450024
Views:
27
>I have a question to VMP4 gurus. I have a form with several tabs. If I am on, say, tab 1, I want add/save/delete to affect Table A. IF I am on tab 2, I want add/save/delete to affect Table B.
>
>My question is what does this involve. Can I do something like
>
1) Save off .icMainAlias and .icMainViewAlias
>
2) Set these properties to another view and table
>
3) Let default behavior fire
>
4) Set .icMainAlias and .icMainViewAlias back to saved values.
>
>Thanks in advance.

Check out the the CusChildCursor... objects (sorry, don't remember the exact name) and see if that is what you want. You may have to bypass some of the "Child" behaviors if the tables are not related in any way to anything else. I'm not sure.

You can have separate controls on each tab that calls the AddAction/DeleteAction of these service objects. If you don't want separate controls, then you could add code to the AddAction of the form to call the appropriate child cursor object depending on the active page of the pageframe.

As for saving, I don't know what you want here. The SaveAction of the form cycles through all views and tables within the datasession and updates everything. Do you mean you only want the save to affect the tables on the current page? If that's the case then I would recommend adding code to the OnEnterEditMode (possibly named something else as I do not have the framework in front of me) method of the form and disable all other pages on the pageframe while you are editing. When you save the changes to that table using the default Save button, enable all the pages.

HTH (some).
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform