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  

Form Filter question



 
 
Thread Tools Display Modes
  #1  
Old May 4th, 2010, 06:16 PM posted to microsoft.public.access.forms
Golfinray
external usenet poster
 
Posts: 1,597
Default Form Filter question

In one form I currently use:
Me.filter = "[district] = """ & Me.cbofilter & """"
Me.filteron = true

That gives me all my projects by school district. I can then look on the
filter property of the form and see the filter set for [district] = "district
name"
Now can I turn that filter off and change it to a different filter based on
the combo selection? And can I concatenate the filter when I do? For example,
when I pull up one district I want the projects of that district AND another
district also. So would I put
Me.filter = "[Little Rock] & [North Little Rock] = """ & Me.cbofilter & """"
If I want to see both districts projects when I come to that district name?
Thanks so much!!!!

--
Milton Purdy
ACCESS
State of Arkansas
  #2  
Old May 4th, 2010, 10:31 PM posted to microsoft.public.access.forms
Jeanette Cunningham
external usenet poster
 
Posts: 2,190
Default Form Filter question

You can build up a string for a filter, very much the same as building a
string for a where clause.
Have a look at Allen Browne's sample search form which shows an easy way to
do this.

http://allenbrowne.com/ser-62.html


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia


"golfinray" wrote in message
...
In one form I currently use:
Me.filter = "[district] = """ & Me.cbofilter & """"
Me.filteron = true

That gives me all my projects by school district. I can then look on the
filter property of the form and see the filter set for [district] =
"district
name"
Now can I turn that filter off and change it to a different filter based
on
the combo selection? And can I concatenate the filter when I do? For
example,
when I pull up one district I want the projects of that district AND
another
district also. So would I put
Me.filter = "[Little Rock] & [North Little Rock] = """ & Me.cbofilter &
""""
If I want to see both districts projects when I come to that district
name?
Thanks so much!!!!

--
Milton Purdy
ACCESS
State of Arkansas



 




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 05:00 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.