468,110 Members | 1,609 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,110 developers. It's quick & easy.

Requery combobox - continuous forms all instances?

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
1 1945
PianoMan64
374 Expert 256MB
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.

Similar topics

1 post views Thread by Georges Heinesch | last post: by
1 post views Thread by piet | last post: by
reply views Thread by Robert | last post: by
5 posts views Thread by ApexData | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.