On Thu, 11 Aug 2011 10:48:59 -0700 (PDT), Rachel Garrett <(E-Mail Removed)>
wrote:
>Hello,
>
>I've got a subform which is successful with ApplyFilter on loading by itself.
>
>However, when I place that subform onto a main form, I get the error message, "[Comments].[Dimension_ID] is not a vaild expression." It asks me to type in a parameter, which doesn't work.
>
>Any ideas why ApplyFilter would behave differently depending on whether the subform is loading on its own, or being loaded from a main form?
>
>Thanks,
>Rachel
Probably because you're not referencing the subform correctly - you didn't
post your code so it is hard to be sure!
The correct syntax for referencing the control Dimension_ID on the subform
named Comments is
Me![Comments].Form![Dimension_ID]
Note that Comments here is the Name property *of the Subform Control*, the box
on the mainform; the name of the form object within that box is irrelevant (it
might be Comments or some other name, but it's not used, just the name of the
Subform Control objext).
--
John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/For...-US/accessdev/
http://social.answers.microsoft.com/.../en-US/addbuz/
and see also
http://www.utteraccess.com