function call as event replacement

  • Thread starter Thread starter stefan hoffmann
  • Start date Start date
S

stefan hoffmann

hi,

is it possible to use a function call as event replacement with the form
itself (Me) as parameter?

In a module i have defined the following:

Public Function FormApplyFilter(AForm As Access.Form) As Boolean
AForm.FilterOn = True
End Function

And i like to set a click property for a button like this in the
property editor:

OnClick = "=FormApplyFilter(Me)"

--> stefan <--
 
stefan hoffmann said:
hi,

is it possible to use a function call as event replacement with the
form itself (Me) as parameter?

In a module i have defined the following:

Public Function FormApplyFilter(AForm As Access.Form) As Boolean
AForm.FilterOn = True
End Function

And i like to set a click property for a button like this in the
property editor:

OnClick = "=FormApplyFilter(Me)"

You can't use "Me", because that is available only in VBA code, but you
can use the form's Form property to achieve the same thing:

OnClick = "=FormApplyFilter([Form])"
 
hi Dirk,

Dirk said:
OnClick = "=FormApplyFilter(Me)"
You can't use "Me", because that is available only in VBA code, but you
can use the form's Form property to achieve the same thing:
OnClick = "=FormApplyFilter([Form])"

It was obvious to me that Me won't work, but i hadn't thougt of [Form].

Thanks a lot.

--> stefan <--
 
Back
Top