PMB wrote:
Thank you in advance for any and all assistance. It is greatly
appreciated. I was wondering how do you refer to controls in a Module,
in a private or public function? I've tried Me.ActiveControl and get
errors. Michael
Code from MSAccess97 help
Sub ActiveObjects()
Dim frm As Form, ctl As Control
' Return Form object pointing to active form.
Set frm = Screen.ActiveForm
MsgBox frm.Name & " is the active form."
' Return Control object pointing to active control.
Set ctl = Screen.ActiveControl
MsgBox ctl.Name & " is the active control " _
& "on this form."
End Sub
You can also pass the control or form to the module
PassIt Me, Me.Text0
Function PassIt(frm As From, txb As TextBox) or
Function PassIt(frm As From, ctl As Control)