Setting a value on a main form from a subform

C

CES

All,
Am I correct in assuming the way to set the value of a control on the main form from a subform is:

Me.Parent.ControlName.Value = "XXX"

Obviously it isn't because I continue to receive errors when I try to access the control.

Thanks in advance. - CES
 
C

CES

CES said:
All,
Am I correct in assuming the way to set the value of a control on the
main form from a subform is:

Me.Parent.ControlName.Value = "XXX"

Obviously it isn't because I continue to receive errors when I try to
access the control.

Thanks in advance. - CES

All,
Once again it seems to be an issue with focus. I was trying to apply during the events Form_Current() & Form_LostFocus() which for some reason was causing a Run-Time error '2448'.
Once I moved the code to the Form_AfterUpdate() Event everything seems to be working and it makes more logical sense. - CES
 
C

Charles Wang[MSFT]

Hi,
Thanks for using MSDN managed newsgroup.

I am glad to hear that you have resolved this issue by yourself. For the
original errors in Form_Current and Form_LostFocus events, if you would
like futher research, could you please mail me ([email protected]) a
test access project so that I can reproduce your issue?

Charles Wang
Microsoft Online Community Support

======================================================
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
======================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================
 
Top