• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 711
  • Last Modified:

After update for combo box

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
cansevin
Asked:
cansevin
1 Solution
 
PatHartmanCommented:
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
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now