This code will check for the notification having been sent, and it not, provide wherewithall to sent it.
But details remain as noted by other posters as to when to update tblUsers so that the message is not sent over and over
unless the user has paid. How does this routine determine if paid?
Code:
'Update tblUsers with notification date
'sub should be in the login form module
'This routine should be called every time the user logs into the database
'Takes into account that the user may not log in on exactly the first of each month.
'Add field RecDate to your tblUsers
Sub subUpdate_tblUsers()
Dim sSQL as string
Dim wDate As Date
wDate = DLookup("RecDate", "tblUsers","WHERE UserName = '" & txtUserName & "'")
'if notice for this month/year already sent, exit
If Month(wDate) = Month(Date) And Year(wDate) = Year(Date) Then Exit Sub
Call subSendUserMessage ' email? msgbox? Don't know how you want to notify user
'You may not want to run below update unless user has taken some action, like making a payment
sSQL = "UPDATE tblUsers SET RecDate = Date() WHERE UserName ='" & txtUserName & "'"
CurrentDB.Execute sSQL, dbFailOnError
End Sub