简体   繁体   中英

MS ACCESS 2007: Limiting subform requery to specific tab

My database is utilizing a metrics dashboard I put together, where there's 5 comboboxes used for parameters to requery subforms in the tabs below it. I have it so everything is functional, but with 5+ subforms based on multiple queries using those same paramters, performance is starting to take a hit.

How could I go about limiting the requery to the currently selected tab?

I can't currently paste my code, but it's basically consisting of a bunch of Me.[subform].Requery's where each query/subform references the same parameters across multiple tabs.

Thanks in advance!

So I ended up finding the answer to my own question, thanks to all those who took the time to respond. I ended up using SELECT Case code for the tab in the parameter combobox after updates.

Private Sub cboMonth_AfterUpdate()
  Select Case Me.TabCtrl.Pages(Me.TabCtrl).Name
  Case "Analysis"
       Me![sfrm_Analysis].Requery
  Case "Travel"
       Me![sfrm_Travel].Requery
  Case "Sharing"
       Me![sfrm_Sharing].Requery
  End Select
End Sub

...and so on for 3 different comboboxes and 2 text boxes (FY, Quarter, Month, Date-range), I didn't post a screenshot because as one commenter suggested, it's sensitive and I'd have to recreate a dummy version on a separate PC just to show you all. Anyway, thanks again for your responses.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM