hello everyone
i created a program with students and their birthday now each time a student have a birthday in the same day a form pop's up
im trying to make like a reminder of 8 days or a week before somebody birthday .
tnx in advanced.
this is the code for the birthday it may help.
*************************************
Private Sub Form_Activate()
Me.WindowState = 2
If UseMenu Then
Set RS = Cn.Execute("SELECT * FROM Students WHERE DAY(StudBirth) = DAY(#" & MyDate(Now) & "#) " & _
"AND MONTH(StudBirth) = MONTH(#" & MyDate(Now) & "#)")
If Not RS.EOF Then
LsVw.ListItems.Clear
While Not RS.EOF
Set Itm = FrmHappy.LsVw.ListItems.Add(, , LsVw.ListItems.Count + 1)
Itm.Bold = True
Itm.SubItems(1) = RS!StudName
Itm.SubItems(2) = Year(Now) - Year(RS!StudBirth)
Itm.SubItems(3) = RS!StudCelular
Itm.SubItems(4) = RS!StudEmail
RS.MoveNext
Wend
End If
End If
MDImain.BttnClose.Visible = True
End Sub
i created a program with students and their birthday now each time a student have a birthday in the same day a form pop's up
im trying to make like a reminder of 8 days or a week before somebody birthday .
tnx in advanced.
this is the code for the birthday it may help.
*************************************
Private Sub Form_Activate()
Me.WindowState = 2
If UseMenu Then
Set RS = Cn.Execute("SELECT * FROM Students WHERE DAY(StudBirth) = DAY(#" & MyDate(Now) & "#) " & _
"AND MONTH(StudBirth) = MONTH(#" & MyDate(Now) & "#)")
If Not RS.EOF Then
LsVw.ListItems.Clear
While Not RS.EOF
Set Itm = FrmHappy.LsVw.ListItems.Add(, , LsVw.ListItems.Count + 1)
Itm.Bold = True
Itm.SubItems(1) = RS!StudName
Itm.SubItems(2) = Year(Now) - Year(RS!StudBirth)
Itm.SubItems(3) = RS!StudCelular
Itm.SubItems(4) = RS!StudEmail
RS.MoveNext
Wend
End If
End If
MDImain.BttnClose.Visible = True
End Sub