Ok so i have this situation where i need to dynamically open a form, see code below, and, if possible, execute a known method for that form.
Open Form Method:
Public Sub ShowForm(par As Form, nm As String)
DoCmd.OpenForm nm
While IsOpen(nm)
DoEvents
Wend
End Sub
Caveat:
Not all forms will have the same method. So if possible add an additional optional parameter to pass through the method call, probably as a string value.
Some examples:
Form1:
public sub InitItem(id as string)
....
end sub
Form2:
public sub InitCategory(id as string)
....
end sub
How about going mad?
OpenArgs, some notes