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

Auto birthday reminder in access 07

Hi
I am Created student database in i want to set birthday reminder at my main form when i open my database and also i want to send pre-composed msg to student mail id who birthday are today.
Jul 2 '16 #1
8 1682
ADezii
8,834 Expert 8TB
Is Microsoft Outlook your E-Mail Client?
Jul 4 '16 #2
No i am not using outlook.
Jul 8 '16 #3
ADezii
8,834 Expert 8TB
Assuming you have a Table named tblStudents with Fields [First Name]{TEXT}, [Last Name]{TEXT}, and [DOB]{DATE/TIME}, the following Code in the Open() Event of the Form will notify you of any Birthdays as well as no Birthdays on any given Date.
Expand|Select|Wrap|Line Numbers
  1. Dim MyDB As DAO.Database
  2. Dim rst As DAO.Recordset
  3. Dim strBuild As String
  4.  
  5. Set MyDB = CurrentDb
  6. Set rst = MyDB.OpenRecordset("tblStudents", dbOpenForwardOnly)
  7.  
  8. With rst
  9.   Do While Not .EOF
  10.     If Format$(![DOB], "mmm dd") = Format$(Date, "mmm dd") Then
  11.       strBuild = strBuild & ![First Name] & " " & ![Last Name] & vbCrLf
  12.     End If
  13.     .MoveNext
  14.   Loop
  15. End With
  16.  
  17. If strBuild = "" Then
  18.   MsgBox "No Birthdays for " & Format$(Date, "mmm dd") & "!", vbExclamation, "No Birthdays"
  19. Else
  20.   MsgBox Left$(strBuild, Len(strBuild) - 2), vbInformation, "Birthdays on " & _
  21.          Format$(Date, "mmm dd")  'Remove ending CrLf
  22. End If
  23.  
  24. rst.Close
  25. Set rst = Nothing
  26.  
Jul 8 '16 #4
Thanks adezil.
but to which form either mainform or another form based on tblstudent code will used.
Jul 9 '16 #5
ADezii
8,834 Expert 8TB
to which form either mainform or another form based on tblstudent code will used.
The choice is yours, whichever is more appropriate.
Jul 9 '16 #6
ok Thanks adezil i will try.
Jul 11 '16 #7
Thanks Adezil it works perfectly. And soory for late to rply..
Jul 30 '16 #8
ADezii
8,834 Expert 8TB
No problem, glad it worked out for you.
Jul 30 '16 #9

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

Similar topics

0
by: Arno R | last post by:
Hi all I still have clients with apps running on Access 2.0 It would be nice if I could use the Auto FE Utility for 1 of them Anybody tried the Auto FE Utility from Tony Toews with Access 2.0...
0
by: Arno R | last post by:
Hi all I still have clients with apps running on Access 2.0 It would be nice if I could use the Auto FE Utility for 1 of them Anybody tried the Auto FE Utility from Tony Toews with Access 2.0...
4
by: Arno R | last post by:
Since I have seen Tony T. around the last week I thought I'll try once more ;-) Hi all, I still have clients with apps running on Access 2.0 It would be nice if I could use the Auto FE...
17
vdraceil
by: vdraceil | last post by:
Can someone help me develop a BIRTHDAY REMINDER in vb6.0?? I want it pop up on the screen once the computer comes to life or when it becomes active..
5
vdraceil
by: vdraceil | last post by:
Hi everyone,i've programmed a birthday reminder in VB6.0.It runs perfectly when added to start up list. I want to make a setup of it,so that when any user installs it,it must add itself to the start...
1
by: Paul Owusu Mensah | last post by:
Bytes I'm having problem with microsoft access / VBA program. I have been able to program for a birthday reminder pop- up in the 'on load property sheet'Form. it is working alright but when I...
4
by: nana2010 | last post by:
Want to a develop an authomatic birthday pop-up reminder in ms access "birthday report" using vb. I want the report to come up with the following fields: date of birth, age and name. Any help?
1
by: sirhacksalot | last post by:
I'm sorry to resurrect an old topic ( Send Email Through Query ) but I am using the code you posted here to send auto emails through access using outlook. Everything works beautifully except the...
2
by: mrijet | last post by:
auto number in access always increase whether the record are save or not...how to make the number maintain until we save the record? For example, if I want create something and the number 14, then...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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.