?
Solved

Access 2010 Filter query by combo box

Posted on 2014-01-13
4
Medium Priority
?
8,081 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

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
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…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

649 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