Solved

After update for combo box

Posted on 2014-03-26
2
694 Views
Last Modified: 2014-03-31
I have a combo box that is based on the value entered in the field above it. It is only working if I hit Shift F9 to update it.

Is there a way to do an "After Update" event that will update the combo query after a value is entered. That way the combo underneath it has the right choices without hitting Shift F9.

Thanks!
0
Comment
Question by:cansevin
2 Comments
 
LVL 35

Accepted Solution

by:
PatHartman earned 500 total points
ID: 39957327
If the combo is using a query with criteria as a rowsource and the criteria points to a control on the form, you need code to force the query to run in the AfterUpdate event of the field used as criteria.

Me.cboCity.Requery
0
 
LVL 84
ID: 39957329
You could requery the second combo form the AfterUpdate event of the first:

Sub FirstCombo_AfterUpdate()
  Me.SecondCombo.Requery
End Sub
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
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…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

839 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