Access function from a different form

You could use similar techniques though in various ways. In general, to call functions that exist elsewhere, you can try the following:

  • you could store the form that has the desired function on the main form (see here)

  • you could store your function in a module

  • you could store your function on a component (that you can access)

  • you can use parent to access the parent form (though this is not always a great approach)

  • you could pass an instance of form to another form (and thus have access to its functions)

The linked post also has a bunch of related links that deal with the same issue. Please have a read.

1 Like