473,805 Members | 1,978 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Create an Alert Box in Access

Hi,
Here is the problem I am facing. I need to create some sort of
message alert that notifies the user upon opening the database that
there are records within 30 days of expiration. I'm not sure if this
requires a Macro, event procedure, etc. I have a field that gives the
expiration date so I could use a formula that calculates 30 days out,
or I also have a field that calculates the number of days to
expiration. I'm not sure exactly where to start to tackle this
problem. I do have Access experience, but never with this type of
problem, so I'm sort of in unfamliar territory. So again, my main
problem is that I just need to for the message box to alert the user
upon opening the database. If anyone has any advice, I'd greatly
appreciate it.
Nov 13 '05 #1
3 22167

Hi there.

Try this url to get you started:

http://msdn.microsoft.com/library/de.../en-us/vbenlr9
8/html/vafctdateadd.as p

and also the msgbox function here:
http://msdn.microsoft.com/library/de.../en-us/vbenlr9
8/html/vafctdateadd.as p

hope this helps

Colin
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #2
You could do it in vb? I am not sure how to get it to execute
automatically upon opening, unless you attach it to the end to a form
button or something but using DAO, you could search the field in the
table

Dim MyDB As Database
Dim MyRecs As DAO.Recordset

Set MyDb = CurrentDb()
Set MyRecs = MyDb.OpenRecord set(tableName, DB_OPEN_TABLE)

MyRecs.MoveFirs t
For i = 1 To recordNumber
If (DateValue(Date )-DateValue(MyRec s!DateField)<30 ) Then
MsgBox "Expiration..." , vbOkay, "Alert"
End
Else
MyRecs.MoveNext
End If
Next
I hope that is some help
Nov 13 '05 #3
mi********@hotm ail.com (MissiMaths) wrote in message news:<75******* *************** ****@posting.go ogle.com>...
You could do it in vb? I am not sure how to get it to execute
automatically upon opening, unless you attach it to the end to a form
button or something but using DAO, you could search the field in the
table


<snip>

To get such a routine to execute on opening the database, simply put
the code in the Open event of the startup form of your database (set
this in Tools - Startup...). The message box(es) will display before
the startup form displays.

Rob
Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
24189
by: Andrew V. Romero | last post by:
I have been working on a function which makes it easier for me to pull variables from the URL. So far I have: <script language="JavaScript"> var variablesInUrl; var vArray = new Array(); function loadUrlVariables() { varString = location.search;
8
3199
by: Steve Neill | last post by:
Can anyone suggest how to create an arbitrary object at runtime WITHOUT using the deprecated eval() function. The eval() method works ok (see below), but is not ideal. function Client() { } Client.prototype.fullname = "John Smith"; var s = "Client"; eval("var o = new " + s + "();"); alert(o.fullname);
1
1640
by: q2005 | last post by:
Hi, all I have a very simple page and on the page there is a small javascript to create a html element. On one of my PC's runs no problem, the page is displayed and the created element is there. While on the other of my PC's (3) the javascript won't create the HTML element. I used an alert() just before it creates the element and I found the difference. On the right PC, when alert() prompted the page was already half done on the screen....
2
2888
by: Kenneth | last post by:
Hi, In a document I have three lines that detects and redirects to another page is a session variable is 0 If Session("Customer_ID")=0 Then Response.Redirect("myPage.aspx") End If What I really would like to have is a notification for the
2
1787
by: ozzii | last post by:
Hi, Does any body know how to create an asp email alert system. I wish to send members an email alert at the end of the day for updates to the site that meet their search criteria. for example if a member has set up a particular job search email alert when a job matching that criteria is posted i need to notify them at the end of the day. I know its possible to generate an email alert at the time the job is posted but this will clogg up...
4
8286
by: sirjohnofthewest | last post by:
If I possessed the power to sway the mind of every user in the world to delete all forms of Internet Explorer I would die a happy man. Hi guys, I frequently visit this site to get answers to my problems and this one is really getting to me... I have a page that allows you to Browse Authors. There are three drop down boxes that auto-populate via AJAX. I have a file which it calls and returns the dynamically built XML file in the boxes...
5
6305
by: vjsv2007 | last post by:
Can you help to make one alert with all details? <script type="text/javascript"> <!-- function validate_form ( ) { valid = true;
3
2279
by: vincentshiu | last post by:
I need to dynamic create input element in some cases, and I use javascript to do that, like the following code: .... var inputElement = document.createElement("input"); this.inputElement.name= "fieldName"; this.inputElement.type = "text"; this.inputElement.value = "somevalue"; ....
0
4269
by: dim505 | last post by:
hi friends, I'm new to this forum. I have created and build a dll but at first it was getting the error"Automation server can't create object" after a lot of head ache,I got the script running. for that I executed the commands regasm path/mydll.dll regasm path/mydll.dll/tlb
0
9716
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10607
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10359
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10364
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10104
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9182
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6875
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5541
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
3007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.