473,288 Members | 1,743 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,288 software developers and data experts.

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 2220
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

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

Similar topics

3
by: pbbriggs | last post by:
I will try to be as descriptive as possible, but this error has me stumped and I am not sure what relevant info to include.... I am running Access XP on a Windows XP machine. I initially began...
1
by: Georges Heinesch | last post by:
Hi. I have a text field (txtTX) and a combobox (cboCB). Both controls are on 2 different subforms (SF1 and SF2) belonging to the main form (MF). MF -+- SF1 --- txtTX +- SF2 --- cboCB txtTX...
7
by: Malcolm Cook | last post by:
Hi, I've created and installed a custom UDF to populate my combobox, and have defined it per :...
4
by: Dave Boyd | last post by:
Hi, I have two very similar forms each with a subform. The main form gets a few fields from the user and passes this back to a query that the subform is bound to. The requery is done when the...
1
by: piet | last post by:
I have created a continues form, based on a query. In the header, there are some comboboxes that gives the user the possibility to make certain selections. Everytime a selection is made on a...
0
by: Robert | last post by:
Thanks and would like to use your suggested join approach however tblSub.FieldA is one field of a two field key (2nd key field say FieldB) for tblSub. So need to exclude tblX.fieldAs in the combo...
1
by: tizmagik | last post by:
I have a combobox on a continuous form that has a recordsource that is set upon Form_Load event via VBA (based on initial form data and external form data entered). For data entry purposes the...
1
by: Bill | last post by:
Problem: Combo box data disappears from view when a requery is done See "Background" below for details on tables, forms & controls On a form, I want to use the setting of bound combo box C1...
5
by: ApexData | last post by:
I have a ComboBox, when dblClicked, displays the combobox's row content in a continuous subform. Changes can be made to this content in the subform and then closed. The ComboBox needs to be...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.