adding event procedure dinamicly

  • Thread starter Thread starter Roy Goldhammer
  • Start date Start date
R

Roy Goldhammer

Hello there

I need to replace the event procedure of control in runtime and send byref
currentForm

I tried to make something like this:

ctl.AfterUpdate = "=myFunction([Me])
and it brought me an error:
The expression after update you entered as the event property setting
produced the following error: The object dosn't contain the automation
object 'me.'

is there a way to send current form i'm working with to function:
 
hi Roy,

Roy said:
ctl.AfterUpdate = "=myFunction([Me])
and it brought me an error:
The expression after update you entered as the event property setting
produced the following error: The object dosn't contain the automation
object 'me.'
is there a way to send current form i'm working with to function:
You have to assign the same string as in the property editor:

ctl.AfterUpdate = "=myFunction([Form])"


mfG
--> stefan <--
 
Just remove the brackets from Me. Here is an example from one of my apps:

Sub SetNavButtons(ByRef frmSomeForm As Form)

called like this:

Private Sub Form_Current()
Call SetNavButtons(Me)
End Sub
 
Back
Top