Problems getting an event procedure to run on a subform

T

trekgoes2malaysia

I am trying to automate changes to values in several text box fields
(e.g. t1, t2, t3) based on the value of a field (venueid) on the
same form. This form is really a subform to a parent form. The user
actually executes changes to the venueid field from the parent form
and these changes are mirrored to a copy of the venueid field on the
subform. Unfortunately the event procedure (change) i have set up on
the subform to change values in the text boxes does not seem to
recognize a change in the subform field (venueid) if the user has made
the change to the same field on the parent form. So how can I make a
subroutine run on a child field based on changes to its parent field?

Hoping for Help,
Patrick
 
S

Stuart McCall

I am trying to automate changes to values in several text box fields
(e.g. t1, t2, t3) based on the value of a field (venueid) on the
same form. This form is really a subform to a parent form. The user
actually executes changes to the venueid field from the parent form
and these changes are mirrored to a copy of the venueid field on the
subform. Unfortunately the event procedure (change) i have set up on
the subform to change values in the text boxes does not seem to
recognize a change in the subform field (venueid) if the user has made
the change to the same field on the parent form. So how can I make a
subroutine run on a child field based on changes to its parent field?

Hoping for Help,
Patrick

If I understand you correctly, you need to alter the subform's change
procedure's declaration from Private to Public. Then it will be accessible
from the main form:

Me.SubformControlName.Form.change
 
S

Stuart McCall

I am trying to automate changes to values in several text box fields
(e.g. t1, t2, t3) based on the value of a field (venueid) on the
same form. This form is really a subform to a parent form. The user
actually executes changes to the venueid field from the parent form
and these changes are mirrored to a copy of the venueid field on the
subform. Unfortunately the event procedure (change) i have set up on
the subform to change values in the text boxes does not seem to
recognize a change in the subform field (venueid) if the user has made
the change to the same field on the parent form. So how can I make a
subroutine run on a child field based on changes to its parent field?

Hoping for Help,
Patrick

If I understand you correctly, you need to alter the subform's change
procedure's declaration from Private to Public. Then it will be accessible
from the main form:

Me.SubformControlName.Form.change
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top