PC Review


Reply
Thread Tools Rate Thread

Access 2003 Filter on form

 
 
New Member
Join Date: Sep 2012
Posts: 1
 
      20th Sep 2012
Hello!
I have a control (cbo_projects) on a form (frm_project_list)
The control has a row source type of value list and row source of "all projects";"Pending Projects";"Validated projects"

The fields that are actually in the table are "Pending Review", "Validated", "Validated with feedback" and also null values.

If a user selects "all projects", they should get all, if they select "Validated Projects" they should get both "validated" and "validated with feedback". "Pending projects" would only pull "Pending Review" records.

The field name that contains the status is "Review_status"

Any idea of the best way to accomplish this?

Thank you!
 
Reply With Quote
 
 
 
 
New Member
Join Date: Mar 2012
Posts: 1
 
      29th Sep 2012
In the _AfterUpdate event of the combo box, manipulate the filter of the form. For example, when 'All Projects" is the selection of the combo box set the filter off (me.form.filteron = false), or when either of the "Validated" cases is selected set the filter to instr(1, Review_Status, "Validated") = 1 (if the 'Validated' always starts in the first character of the value, otherwise use > 0) then set filteron = true.
Not having played with it (and not remembering off the top of my head) you might have to be careful in the case of Null values for Review_status so you might need to use something like instr(1,nz(review_status,""),"Validated).
HTH
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why does unlinked sub form lose filter when main form filter is turned off?? jgeniti Microsoft Access Forms 4 29th Jan 2007 05:13 PM
Filter Filter Filter =?Utf-8?B?YW1zdXJpYQ==?= Microsoft Access Form Coding 5 28th Nov 2006 11:37 AM
Filter by Form/Apply Filter Command Buttons Chris Microsoft Access Forms 1 9th Jan 2004 04:22 PM
Filter on Form and Apply Filter jimtyson Microsoft Access Forms 0 7th Nov 2003 03:17 PM
Filter by Selection/Filter by Form Report Alan Microsoft Access 1 22nd Jul 2003 05:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:29 PM.