473,505 Members | 14,618 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Automatically Requery

102 New Member
MS Access 2010/VBA

The users of the attached query want a third button added that when pushed will cause the query to re-query itself automatically every 3 minutes. How can I do this? Thanks in advance.
Attached Files
File Type: doc Doc1.doc (37.5 KB, 326 views)
Dec 16 '14 #1
3 3547
jforbes
1,107 Recognized Expert Top Contributor
Put the requery code into the Form_Timer event. Then in the new Button's click event, set the Forms timer interval to 3000. ...3000 because the Form Timer uses milliseconds.

I use the following for a Checkbox to toggle a timer off and on:
Expand|Select|Wrap|Line Numbers
  1. Private Sub chkTimer_AfterUpdate()
  2.     If Me.chkTimer.Value Then
  3.         Me.TimerInterval = nTimerInterval
  4.     Else
  5.         Me.TimerInterval = 0
  6.     End If
  7. End Sub
Dec 16 '14 #2
twinnyfo
3,653 Recognized Expert Moderator Specialist
P.S. For a three minute interval, TimerInterval should be 180000 (3 minutes, x 60 seconds x 1000 milliseconds).
Dec 16 '14 #3
jforbes
1,107 Recognized Expert Top Contributor
Haha, nice catch Twinnyfo!
Dec 16 '14 #4

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

Similar topics

0
1908
by: Dalan | last post by:
I'm sure there is a workaround for this, but haven't found it yet. I have a mainform with two subforms and after one or both of the subforms are updated, then clicking the Refresh button on the...
6
5465
by: Tim Marshall | last post by:
Here's the situation. A form, frmSetUp, with a subform control called subExplain with a source object form frmSetUpSubDefineSides. The source object is a bound form, displaying a few records, no...
6
9911
by: Mark | last post by:
Hello. I have a listbox whose rowsource is set to a saved query (call it "qry_customer_list.") When I add customers to my database, I call the listbox Requery method so that the listbox will...
2
3399
by: stan | last post by:
I'm sure I'm missing something simple here; help will be appreciated. I've got a search form that displays records from a MySQL db matching criteria entered by the user; the search form appears...
11
7129
by: mrowe | last post by:
I am using Access 2003. (I am also using ADO in the vast majority of my code. I recently read a post that indicated that ADO is not all that is was initially cracked up to be. In the back of my...
3
3446
by: LROCCO | last post by:
Hi, I have a form which contains a subform. When I'm entering data into the subform it seems to requery automatically. When this occurs the focus goes to the start of the subform. Firstly,...
2
1014
by: Lyn | last post by:
Hi, I am using a form (FormA) to list the records in a recordset. In the FormA footer, I have an "Add" command button that opens a new form (FormB) modally which is used to input and save a new...
1
2232
by: truckfin | last post by:
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...
2
3419
by: Arnold | last post by:
Hi Gurus, I am getting the error 3420 "object invalid or no longer set" at in the line -- rst.FindFirst "=" & NextPK --in the code below. I simply have a continuous main form that is, by...
6
2839
by: ConfusedMay | last post by:
Hi, I'm using access 2003. I have a textbox called txtdate on the main form and when I click this textbox I have a calendar pop up and users can select which date they want it to be appear on this...
0
7216
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7098
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7367
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7018
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5028
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4699
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3187
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
754
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.