A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Subform filter on the fly



 
 
Thread Tools Display Modes
  #1  
Old June 14th, 2004, 06:43 PM
yagfxgeek
external usenet poster
 
Posts: n/a
Default Subform filter on the fly

I have a subform that I am attempting to set a filter value for.
However access claims that the subform does not have a property or
method called filter. I know its not a misspelled name or anything as
I can execute a refresh on the sub form:

Forms!frm_BUDATA!Contacts.Requery

However, the statement:

Forms!frm_BUDATA!Contacts.Filter = sFilter

Generates an error. Can anyone shed some light on this?

Thanks!
  #2  
Old June 14th, 2004, 06:58 PM
Dirk Goldgar
external usenet poster
 
Posts: n/a
Default Subform filter on the fly

"yagfxgeek" wrote in message
om
I have a subform that I am attempting to set a filter value for.
However access claims that the subform does not have a property or
method called filter. I know its not a misspelled name or anything as
I can execute a refresh on the sub form:

Forms!frm_BUDATA!Contacts.Requery

However, the statement:

Forms!frm_BUDATA!Contacts.Filter = sFilter

Generates an error. Can anyone shed some light on this?

Thanks!


The subform *control* you are referencing has no such property, but the
form object it is displaying does. Try:

Forms!frm_BUDATA!Contacts.Form.Filter = sFilter

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


  #3  
Old June 14th, 2004, 07:04 PM
Dirk Goldgar
external usenet poster
 
Posts: n/a
Default Subform filter on the fly

"Dirk Goldgar" wrote in message

"yagfxgeek" wrote in message
om
I have a subform that I am attempting to set a filter value for.
However access claims that the subform does not have a property or
method called filter. I know its not a misspelled name or anything
as I can execute a refresh on the sub form:

Forms!frm_BUDATA!Contacts.Requery

However, the statement:

Forms!frm_BUDATA!Contacts.Filter = sFilter

Generates an error. Can anyone shed some light on this?

Thanks!


The subform *control* you are referencing has no such property, but
the form object it is displaying does. Try:

Forms!frm_BUDATA!Contacts.Form.Filter = sFilter


And don't forget to follow up with

Forms!frm_BUDATA!Contacts.Form.FilterOn = True

More efficient would be

With Forms!frm_BUDATA!Contacts.Form
.Filter = sFilter
.FilterOn = True
End With

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


  #4  
Old June 15th, 2004, 03:42 PM
yagfxgeek
external usenet poster
 
Posts: n/a
Default Subform filter on the fly

"Dirk Goldgar" wrote in message ...
"Dirk Goldgar" wrote in message

"yagfxgeek" wrote in message
om
I have a subform that I am attempting to set a filter value for.
However access claims that the subform does not have a property or
method called filter. I know its not a misspelled name or anything
as I can execute a refresh on the sub form:

Forms!frm_BUDATA!Contacts.Requery

However, the statement:

Forms!frm_BUDATA!Contacts.Filter = sFilter

Generates an error. Can anyone shed some light on this?

Thanks!


The subform *control* you are referencing has no such property, but
the form object it is displaying does. Try:

Forms!frm_BUDATA!Contacts.Form.Filter = sFilter


And don't forget to follow up with

Forms!frm_BUDATA!Contacts.Form.FilterOn = True

More efficient would be

With Forms!frm_BUDATA!Contacts.Form
.Filter = sFilter
.FilterOn = True
End With


Thank you SO much!
 




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 Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:05 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.