I want a macro attached to one form to open another with a restricted range of values (i.e. by setting a filter on it).
I can open the form successfully:
WantedForm = ThisDatabaseDocument.FormDocuments.getByName("Form-A")
WantedForm.open()
But then I want to set a filter. WantedForm.filter = ("[Table-A].[Field1] = " & FilterVal)
is not recognised as a method. The main content of the form is of course named “MainForm” - but how do I address the filter property of the main form (assuming WantedForm.reload()
at the end)?