Cascading comboboxes in a subform does not refresh values.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AccessBeetle
    New Member
    • Jul 2009
    • 111

    Cascading comboboxes in a subform does not refresh values.

    I have a form which shows a search results based on certain parameters. This form has a subform which has three cascading comboxes, County, Township and Quadmaps. Township and Quadmap should show values based on the County selected.
    Now when a user performs a search, it does not refreshes the values in the comboboxes. I have attached the screenshot. For security reasons I have grayed some part.
    Please help. Let me know if you need more info.
    Attached Files
  • tasawer
    New Member
    • Aug 2009
    • 106

    #2
    Hi

    Usually a requery method is used to refresh the subform. This can be added in the afterupdate property of your combobox.

    Code:
    Forms![MainForm].[SubForm].Form.Requery
    other than this, we may need to see your code and the underlying query.

    I hope this helps.

    Comment

    • AccessBeetle
      New Member
      • Jul 2009
      • 111

      #3
      OK I figured out what the error was. It was the underlying queries.
      The fixed query under cmbTownship should look like this
      Code:
      SELECT dbo_ValLglTownship.CountyID, dbo_ValLglTownship.LglTownship, dbo_ValLglTownship.ValLglTownshipID
      FROM dbo_ValLglTownship;
      instead of
      Code:
      SELECT dbo_ValLglTownship.CountyID, dbo_ValLglTownship.LglTownship, dbo_ValLglTownship.ValLglTownshipID
      FROM dbo_ValLglTownship
      WHERE (((dbo_ValLglTownship.CountyID)=[forms]![frmSearchByTitle]![SubfrmLocation].[form]![cmbCounty]));

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32662

        #4
        Indeed.

        See Example Filtering on a Form.

        Comment

        Working...