Run Code in parent form from subform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I tried several variations rx!ForceCode = "cboCustomer_AfterUpdate" and it
is a public Sub. the value of changes. Below is what I have tried. Any
Suggestions?

Parent.Form (rx!ForceCode)
 
Tracey said:
I tried several variations rx!ForceCode = "cboCustomer_AfterUpdate" and it
is a public Sub. the value of changes. Below is what I have tried. Any
Suggestions?

Parent.Form (rx!ForceCode)

If you have declared cboCustomer_AfterUpdate as public, then call it
from the subform with

Call Me.Parent.cboCustomer_AfterUpdate

HTH
Matthias Kläy
 
i missed a detail. the name of the event/proc is held in a table and returned
via recordset. so the event/proc changes depending on which field is being
updated.
sometimes rx!ForceCode = AfterUpdate, sometimes rx!ForceCode = Cmd_Click,
etc. I am passing the name of the event/proc to the code. Any other
suggestions
 
Tracey said:
i missed a detail. the name of the event/proc is held in a table and returned
via recordset. so the event/proc changes depending on which field is being
updated.
sometimes rx!ForceCode = AfterUpdate, sometimes rx!ForceCode = Cmd_Click,
etc. I am passing the name of the event/proc to the code. Any other
suggestions

well this is *some* detail ...
AFAIK you have to use Eval with this kind of indirection, e.g.

Eval("MyFunction()")

I don't know if this works with procedures in a form. What, exactly,
are you trying to achieve? Perhaps there is a simpler solution.

Greetings
Matthias Kläy
 
Back
Top