filter syntax

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Given that

Me.Form(strFoundItemsForm).Name

returns the correct result, and that

strSQL = "Item = '1'"

can anybody see why this statement

Me.Form(strFoundItemsForm).Filter = strSQL

should cause "Run-time error '438': Object doesn't support this property or
method"?

Thanks!
 
Sorry, I might not have given enough info. 'Me.Form(strFoundItemsForm)' is
obviously a subform. It is set to display in 'datasheet view'. There is a
query behind it; is that my problem?
 
Hi Allen,

try this:

Me.Form(strFoundItemsForm).Form.Filter = strSQL

Me.Form(strFoundItemsForm) is the subform control -- its height, width,
SourceObject, etc

Me.Form(strFoundItemsForm).Form is the form inside the subform control
-- and that is where your records are...

Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
Remote programming and Training
strive4peace2006 at yahoo.com
*
 
Thankyou very much, Crystal.

I was starting tho think i would have to join some secret society before the
arcane syntax of forms would be fully revealed to me.
 
LOL!

you're welcome, Allen ;) happy to help

Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
 
Back
Top