We have a Customer table with a <Cust No.> and a <Cust 2 No.> field on it.
We also have an allotment table on which <Cust No.> and <Cust 2 No.> may have received the same allotment - ie they bought it in partnership.
We have created a customer card with a subform (the subform is over the Allotment table). We want to list all allotments related to the Customer selected. The trick is that the Customer may have purchased allotments as either <Cust No.> or <Cust 2 No.> field.
Ideally it would be nice to have a subform link of the following:
Cust No.=FIELD(No.) or Cust 2 No. = FIELD(No.)
OK - back in the real world now.....I know there is no OR relationship.
Has anyone coded a subform to mark records so that both selection sets can be processed - can this be done,....any suggestions? :?: :?: :?:
Cheers
Kylea White
Senior Developer
0
Comments
In the OnAfterGetCurrentRecord of the header, you need to call the function in the subform. Remember to give your subform a name, otherwise you can't access it.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Thankyou for your help Kriki.
Following your instructions this is what I did.
1) Removed existing subform link from Customer Card. F21
2) Added function [MarkAllotRecs] with parameter to receive Rec as per below to subform F50128
3) Add code to Customer Card OnAfterGetCurrRecord as per below.
Hopefully someone else will get some benefit from this.
Thanks again.
Kylea White