473,473 Members | 1,541 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Form alert

7 New Member
I want my form to generate more the than an alert with different time interval. For Example I want my form to open a report after every 30sec and open another report after 1min interval.
Sep 8 '14 #1
1 1059
twinnyfo
3,653 Recognized Expert Moderator Specialist
mabsalam,

I am assuming open one report at 0:30, the other report at 1:00 and then the first report at 1:30?

One way is to have a class-specific boolean variable decalredin teh top section of your form's VBA (such as fReport). When the form opens set that variable to false (it will be by default).

Set the timer interval for 30 seconds (30,000). Then, something like this:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Timer()
  2. On Error GoTo EH
  3.     If fReport Then
  4.         DoCmd.OpenReport "ReportA"
  5.     Else
  6.         DoCmd.OpenReport "ReportB"
  7.     End If
  8.     fReport = Not fReport
  9.     Exit Sub
  10. EH:
  11.     MsgBox "There was an error opening the report!  " & _
  12.         "Please contact your Database Administrator.", vbCritical, "Error!"
  13.     Exit Sub
  14. End Sub
Hope this helps!
Sep 8 '14 #2

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

Similar topics

3
by: mathieu gagnon | last post by:
Hello, I'm new to this newsgroup and I have small question. With something like this : <form name="a"><input name="name"></form> Is it possible to get the name of the form (a) and access the...
4
by: Howard Jess | last post by:
In Opera 8.01 (Linux; Build 1204) and in Opera 7.54 (Windows XP; Build 3865), my form disappears from the HTML markup (below). To summarize: 1) In a <script> block in the <head> I create a form...
4
by: Zhang Weiwu | last post by:
This is really very stange. I have a form like this: <form id="form_A"> xxxx </form> This form is on one page in a page of a web application, it is the only form on that page. on the end of...
15
by: mike | last post by:
I'm drawing a blank on this. I have html like: <form name="test1"> <input name="inp1" onclick="alert(this.parent.form);"> <a href="javascript:void(null);"...
3
by: michael | last post by:
let me keep it clean, quick and simple. I am passing a variable into another window and am reassigning the value on the new page - window.document...value = opener.document. ....value and...
2
by: this one | last post by:
I have the following code <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script language="JavaScript"...
19
by: Taras_96 | last post by:
Hi everyone, How do you detect that a form element has been changed? This thread: ...
2
by: justplain.kzn | last post by:
Hi, I have a table with dynamic html that contains drop down select lists and readonly text boxes. Dynamic calculations are done on change of a value in one of the drop down select lists. ...
0
by: phpuser123 | last post by:
This is the script I modified.What I wanted here is as soon as the getDisplay() method is invocked,to get an alert box so I instantiated the alert class and implemented some codes fr this..But when I...
1
by: saranya prabaka | last post by:
this is my on click function: <html:submit styleClass="button" property="orderBtn" onclick="payTypeValidation(this.form);" in java script im having: function payTypeValidation(form) {...
0
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
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
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.