Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

After update for combo box

Posted on 2014-03-26
2
Medium Priority
?
707 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 40

Accepted Solution

by:
PatHartman earned 2000 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 85
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In a use case, a user needs to close an opened report by simply pressing the Escape (Esc) key. This can be done by adding macro code in Report_KeyPress or Report_KeyDown event.
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…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

916 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