dbTalk Databases Forums  

Subform filtering error

comp.database.ms-access comp.database.ms-access


Discuss Subform filtering error in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Atlas
 
Posts: n/a

Default Subform filtering error - 04-08-2004 , 12:50 PM






Access 2003 + ms sql server 2000 (adp)

I have a continuos form whose contents are populated dinamically at runtime
(whenever two comboxes on the form change values) with a "select " statement
assigned to the form's recordsource property.

The form also has a subform (datasheet view) linked by child/master fileds
properties.

It all works perefectly.


Now wishing to set a filter on the subform programmatically, I've put the
following code in button click event:

With Me.subformcontrolname..Form
.Filter = "[Data] > #01/01/2000#" 'it's a date, but also tried to
filter with int values......always the same problem
.FilterOn = True
End With


Unfortunatelly I get the error:

The column prefix 'subformcontrolname'
does not match with a table name or alias name used in the query


If I put the same code in the subform (simply opening the subform as a form)
it works.

Only when I try to set the filter when the form<->subform relation is true,
it fails. I've tried to put the code either in the form or the subform
(obviuosly with proper changes) but still the same error.


Help!!!!






Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.