I was wondering if there was a way to call a function on the form of one window from another form on another window?
Thanks.
Printable View
I was wondering if there was a way to call a function on the form of one window from another form on another window?
Thanks.
Why not just have the function in a global module, then you can call it from any form within the application.
What sort of windows? Same app or different apps?
Same application.
The function that I want to call is the save function i have on the asp button on the form, would I be able to call that function from another form?
Or if I do create a global module would I be able to refer to fields on the windows form?
You can create a global "Save" function that accepts a form as a parameter.
Example
VB Code:
Public Sub Save(ByVal FormName As Form) 'Code here End Sub
So from there I can connect to whichever database I need based on the form as well as access all the fields that reside on that form, is that correct?
sounds that way