Goran Level: Moderator
 Registered: 16-05-2002 Posts: 1681
|
Re: Public Function call
There is a Forms collection which contain all opened forms. All you need to do is loop through it and find a form by name that you want to access. In addition, public sub will receive a form's bane as a parameter.
Public Function Lockit(frmName as string) as boolean
dim cForm as form
for each cform in forms
if cform.name=frmname then
cForm.cmd1.Enabled = True
cForm.cmd1.Locked = False
lockit=true
endif
next cform
end function |
____________________________
If you find the answer helpful, please mark this topic as solved.
|