ApplyFilter gives error only when subform is placed on main form

  • Thread starter Thread starter Rachel Garrett
  • Start date Start date
R

Rachel Garrett

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
 
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/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com
 
Back
Top