473,386 Members | 1,726 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,386 software developers and data experts.

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 22111

Hi there.

Try this url to get you started:

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

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

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.OpenRecordset(tableName, DB_OPEN_TABLE)

MyRecs.MoveFirst
For i = 1 To recordNumber
If (DateValue(Date)-DateValue(MyRecs!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********@hotmail.com (MissiMaths) wrote in message news:<75**************************@posting.google. 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
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(); ...
8
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() { }...
1
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....
2
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...
2
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...
4
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...
5
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
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=...
0
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...

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.