Updating the subform page from a parent page
The subform page only reloads data when it knows it needs to. Unfortunately, it is not very smart. This recipe will show you how to force a subform page to refresh itself.
How to do it...
Create a new page from Object Designer.
Choose the Create Blank Page option to design a page from scratch.
Add the following global variables to the page:
Name
Type
A
Integer
B
Integer
Next, add a global function called
SetValues
.Add the following parameters to the function:
Name
Type
Aparam
Integer
Bparam
Integer
Now add the following code to the function.
A := Aparam; B := Bparam;
Add another global function called
UpdateSelf
.Then add the following code to the function:
CurrPage.UPDATE;
From the Page Designer window, set the following page property (Shift + F4):
Property
Value
PageType
CardPart
Add the following variables in the Page Designer window:
Type
SubType
SourceExpr
Name
Container
ContentArea
MainContaine
rGroup
Group
MainGroup...