Andy:
It's not clear to me if frmEventMain is an instance of a form or the
name of the class wherein the form is defined. Assuming it's an
instance of the form you could...
1) Call your proc passing frmEventMain as a parameter
2) Call your proc passing frmEventMain.dg as a parameter
3) Assuming frmEventMain is visible within your proc, you could access
frmEventMain.dg directly.
My preference would be #2 because it would make your proc more
generally useful.
--
// Lee Silver
// Information Concepts Inc.
Andy.I wrote:
Hi
I have a module where I put all my functions and sub procedures. How do I
from the module best reference objects in other forms?
I have a form with a datagrid, and in the module I have a procedure to fill
this datagrid.
The datagrid is called dg, the form frmEventMain
Would this be correct:
frmEventMain.dg.Datasource = dt when I reference the datagrid in another
form?
/A.