Results 1 to 2 of 2

Macro to requery cascading combo box in subform

  1. #1
    ccook241 is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2018
    Posts
    5

    Unhappy Macro to requery cascading combo box in subform

    I have cascading combo boxes nested within subforms. I've managed to set the row source of the subform combo boxes such that they refer to the parent form combo box, but I am having trouble getting the macro for the requery in the After Update event of the first combo box (on the main form) to work.

    combo box in main form 'frmSite' = cboSite
    combo box in subform 'subfrmLightDate' = cboLightDate



    In the macro builder I select the Requery action and simply type in the Control Name of the subform combo box (cboLightDate), but I get the error "There is no field named 'cboLightDate' in the current record."

    It seems that the macro builder in the main form is not recognizing fields/combo boxes in the subforms. I've attempted to troubleshoot this issue by specifying the subform name as the Control Name in the Requery action. It will recognize the subform name as a usable feature but still will not recognize the 'cboLightDate' feature.

    Any help is greatly appreciated!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    45,289
    Have to reference the subform combobox with form/subform prefix.

    Instead of AfterUpdate of the parent combobox, use the GotFocus event of the subform combobox, then the referencing is simplified.
    To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression. Attachment Manager is below Advanced editor window, click Go Advanced below Quick Reply window.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Cascading combo requery issues
    By ccook241 in forum Database Design
    Replies: 5
    Last Post: 10-30-2018, 05:38 PM
  2. Replies: 0
    Last Post: 07-05-2016, 08:29 AM
  3. Requery with cascading combo boxes
    By TanyaH in forum Forms
    Replies: 8
    Last Post: 04-21-2013, 06:12 AM
  4. cascading combo boxes, .requery not working
    By jsmath22 in forum Forms
    Replies: 8
    Last Post: 10-12-2012, 11:28 AM
  5. Cascading Combo Boxes Requery Problem
    By Jo22 in forum Forms
    Replies: 9
    Last Post: 01-28-2012, 08:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Tech Forums: Microsoft Office Forums