Pop-up box for Birthdays

Latoya

Registered User.
Local time
Yesterday, 22:29
Joined
Nov 22, 2004
Messages
13
Is it possible to have a pop-up box (reminder) for birthdays in a database? I have the DOB for everyone in a table and would like to have a pop-up when the database starts up stating the name of the person who has a birthday that day.
 
Create a startup form for yourself and put some code in it. That will ensure the code will run when the database is opened. Create a pop-up form that uses as it's recordsource a query that looks for people with DOB equal to that day. If there are any, then you can display the form, otherwise, just close the form or have it display a message saying there are no birthdays that day.

I'm sure you'll have more questions, but that's the basic outline.
 
Latoya said:
Is it possible to have a pop-up box (reminder) for birthdays in a database? I have the DOB for everyone in a table and would like to have a pop-up when the database starts up stating the name of the person who has a birthday that day.

There are many ways you can do this.

Have a staff table, and in it have a dob field as a date.

Then using the Form's onload code

Currentdate = Format(Now, "dd") & " " & Format(Now, "mmmm") & " " & Format(Now, "yyyy")

checkbday = dlookup("name", "staff", "dob = #" & currentdate & "#")
If isnull(checkbday) = False and checkbday <> "" Then
msgbox "Happy Birthday " & checkbday
End If
 

Users who are viewing this thread

Back
Top Bottom