By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,052 Members | 1,456 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,052 IT Pros & Developers. It's quick & easy.

Requery combobox - continuous forms all instances?

P: 1
Hi,
i know there has been a lot of posts on refreshing/requerying comboboxes. But I cant seem to get it to do what i want.

i've got a bound subform set to continuous forms on a bound form that has a combobox that looks up values in another bound form, and in the AfterUpdate Event the following code.

Expand|Select|Wrap|Line Numbers
  1. [AreaAllowed] = [WorkstyleDefID].[Column](2
  2. OccupantWorkstyle] = [WorkstyleDefID].[Column](1)
I want the subform to requery the values in workstyleDefID to ensure any changes are automatically reflected. I've put a requery in the onCurrent of the main form and subform.

This is working but not how I want it to. What i'm finding is it's only updating the record that has focus. I'd like all instances of records visible on the continuous form to requery.

Is this possible? Thanks
Jan 3 '08 #1
Share this Question
Share on Google+
1 Reply


Expert 100+
P: 374
Yes, it is possible.

the simplest way to do it would be to code the Subform itself with an OnTimer event.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Timer()
  2.     Me.Requery
  3.     Me.Repaint
  4. End Sub
  5.  
and then on the Timer Interval property on the Subform itself, set the value to something over 1000. The scale for using the Timer Interval is 1000 = 1 Sec. So keep that in mind.

Hope that helps.
Jan 5 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.