Solved

Clearing filter on popup dialog form and reset to new value

Posted on 2011-02-18
17
983 Views
Last Modified: 2012-06-27
I have setup a popup form to allow users to tag a list of pre-filtered values in a lookup reference table - code library.  This works very well and will allow user to tag a set back to the openArg value from the event control source.

I need to either tag the list filtered or clear filter and use combo box to set a new filter.

See Screencast video on the issue.

http://screencast.com/t/Hu5t5ao6

Thanks
Ivan
0
Comment
Question by:phoenxMan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 9
  • 8
17 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 34928713
do you have an afterupdate event on that combo Box?

after setting the value of the combo to myarg, call the afterupdate event of the combo box

0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 34928886
or call the Click event of the button that sets the filter.
0
 

Author Comment

by:phoenxMan
ID: 34928925
The under lining query for the popup has a criteria using Like filter on the recordset, verses setting the filter property

The combo box filter will change. I preferring to reset the filter property.  But I get a request of parameter when I do this.

I believe if I get the correct syntax to reset after cbo update the filter on the forms property verses a like criteria on the SQL . This should work.

   me.filter = Itemgroup &"=" & me.cbofiltergroup

but syntax is on the filter = Itemgroup = 'PatientNarrative'

How would you write the event to set this value back to the form filter property?

Thanks


0
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 

Author Comment

by:phoenxMan
ID: 34928931
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 34928995
clear the Filter property of the form in design view, save form
try just to requery the form

private sub form_load()
me.cboFilterGroup=myArg
me.requery

end sub
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 34929012
if that still fails try this

private sub form_load()
me.filter=""
me.cboFilterGroup=myArg
me.requery

end sub
0
 

Author Comment

by:phoenxMan
ID: 34929026
Can the form filters be cleared and set dynamically in view mode?  

I will try what you suggest.  

But when I load the form I need to set a default value from the control name on the source event. Either to the form filter property or the the combo box filtering by SQL criteria.
0
 

Author Comment

by:phoenxMan
ID: 34929595
I tried setting the myArg to the combo after clearing the filter in design view.  Still not setting the value (myArg) to the combo box.

0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 34929737
upload a copy of the db
0
 

Author Comment

by:phoenxMan
ID: 34929828
It is a double click on the yellor Patient Narrative field to open the popup.

0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 34930028
0
 

Author Comment

by:phoenxMan
ID: 34930206
Not sure if I understand the if then logic.  But it works.
Thanks a million.
0
 

Author Comment

by:phoenxMan
ID: 34931541
I tested the code and the openarg on other controls and found the filter is not released other than the first field use Patient Narrative.  I check the code for changes you make to the openform filter and openarg settings.  

See short video showing the difference.  No narrative.

http://screencast.com/t/f2SCTaMG

0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 34933251
you have two popup forms, "PopupTagMultiSelectitemswithFilter" and "PopupTagMultiSelectitems"

the changes in this uploaded db is NOW done only for  "PopupTagMultiSelectitems"

RebuttalMaster--2A.accdb
0
 

Author Comment

by:phoenxMan
ID: 34933303
I see one new line I did not see in the previous version.  
Private Sub Form_Load()
If Me.OpenArgs & "" <> "" Then
    Me.cboFilterGroup = Me.OpenArgs
    Me.Requery
End If
Me.getFilter = myArg

End Sub

Its working great now.

Thanks
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 34933307
this line
Me.getFilter = myArg

is already there, don't know where you use it for.
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question