I’m trying to make a checkbox on my mainform that reduces the foundset on one of the tabpanels that is showing. I have a global field, of type “checkbox” and attached to that I have a OnDataChange method with the following code:
if ( globals.ShowAll2 )
{
forms.invoices_for_match_right.controller.loadAllRecords()
}
else
I fiddled around with your comments a bit. I got it working in the end, by commenting out the last line of code. With the line not commented out I get an errormessage very time:
“Error setting Formmodel, Can’t set a model from table customers for form table invoices”
Can you tell me what is means?
And also, I thought I always had to do a loadRecords after a find/search combination… I guess i was wrong
There is a typo in the error msg, it should say:
Can’t set a foundset from table customers into a form using table invoices
I think this makes it clear.
When I do a plain and simple find in a form, no relationship or wahtsoever, I see no difference in behaviour concluding it with a control.loadRecords() or control.loadAllRecords().