Update text box from combo box

F

Fee08

Hi All,
I have looked through the board to find the answer for the following
question, however, have been unable to find it ... my apologises if the
answer is already here.

I have a text box on form C (a subform of form B which is a subform of form
A)that needs to be updated from a combo box on form B. Forms B and C sit in
a tab control on form A.

What I am trying to acheive is that when I change the value in the combo box
on form B, the text box on form C automatically updates. If I close the form
and reopen, without the coding below, the update works.

I have tried variations on the following:
=Me.frmContractSUBCommission.Form.repsold.Requery

however get the message that
The expression After Update you entered as the event property setting
produced the following error: The object doesn't contain the Automation
object Me.

Any help would be greatly appreciated.

Fee08.
 
D

Dale Fye

You must refer to the name of the subform control, not that actual name of
the subform. So if the control name of subform C, on subform B is sub_C, and
the text box is txt_FillFromCombo, then the combo boxes after update code
should look like:

Private sub cbo_SomeCombo_AfterUpdate

me.sub_C.Form.txt_FillFromCombo.value = me.cbo_SomeCombo.value

End sub

--
HTH
Dale

Don''t forget to rate the post if it was helpful!

email address is invalid
Please reply to newsgroup only.
 

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