?
Solved

Access 2010 Filter query by combo box

Posted on 2014-01-13
4
Medium Priority
?
7,866 Views
Last Modified: 2014-01-14
Going Crazy,, I was so used to Access 2003.   I now have a continuous form in Access 2010. Control source is query "qry_ElistSearch".  I have a combo box on form, that I want to filter the form using it.  I am not used to embedded macros and all that.  I want to after update filter the form.  The PriKey on the form combobox to match up with PriKey on the query.   I have been out of it for awhile and need to get back into simple Combo Box filtering...  Any help is appreciated.  I had it earlier and lost it...
0
Comment
[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
  • 2
  • 2
4 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 39778199
< I am not used to embedded macros and all that.>

you can switch to [Event Procedure] by selecting
File > Options
From the Access Options window, select Object Designers

look for Form/report design view section and check  Always used Event Procedure

do you still need the filtering codes using the afterevent update of the combo box?
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 total points
ID: 39778209
using the AfterUpdate event of the combo box

private sub comboName_afterupdate()
if me.comboname & ""<>"" then
me.filter="[FieldName]= " & me.comboname

else
me.filter=""

end if

me.filteron=true

end sub
0
 
LVL 4
ID: 39780033
That's It,, thank you.. I will be asking another shortly how to filter by a second cbo box.  Thanks for all your help.. You helped me years ago with other projects.  I am so glad you are still here...
0
 
LVL 4

Author Closing Comment

by:get-ADuser -F ($_.Name -eq "Todd")
ID: 39780058
100 percent perfect and worked like a charm
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

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

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

765 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