Refer to Subform Controls

  • Thread starter Thread starter Joe Williams
  • Start date Start date
J

Joe Williams

I have a main form named "NCMR By Part"
I have a sub form named "NCMR By Part Sub"
I have a control on the subform named "NCMR"

I am trying to open another form using the control from the sub form as the
WHERE CONDITION. The statement looks like this:

DoCmd.OpenForm "NCMR Update", acNormal, , "[NCMR] = forms![NCMR By
Part]![NCMR By Part Sub].[Form]![NCMR]"

I am getting an input prompt "Enter Parameter Value: and Forms!NCMR By
Part!NCMR By Part Sub.Form!NCMR like it can't resolve the path to the
subform control."

Any ideas?

THanks,

joe
 
Joe said:
I have a main form named "NCMR By Part"
I have a sub form named "NCMR By Part Sub"
I have a control on the subform named "NCMR"

I am trying to open another form using the control from the sub form as the
WHERE CONDITION. The statement looks like this:

DoCmd.OpenForm "NCMR Update", acNormal, , "[NCMR] = forms![NCMR By
Part]![NCMR By Part Sub].[Form]![NCMR]"

I am getting an input prompt "Enter Parameter Value: and Forms!NCMR By
Part!NCMR By Part Sub.Form!NCMR like it can't resolve the path to the
subform control."


Except for being the long way to reference it, the reference
is OK, the problem is that it's can't be resolved in that
context. Try witing it this way:

DoCmd.OpenForm "NCMR Update", acNormal, , _
"[NCMR] =" & Me.NCMR
 
Back
Top