Simple enough with a single-user database but more complex with a multi-user database. Your reference to 'member' confused me because you didn't explain it. If the field member is in a table and is actually the user's login username then we could write a small application that runs at startup. The following is an off-the-cuff response that was not tested but it's awfully close.
' We must determine the username for the current user
' to compare it with the member in the table
Dim strUser As String
strUser = CurrentUser
' Now we need to find out when the last time the user
' was given a monthly prompt.
Dim strSQL As String
Dim db As Database
Dim rst As Recordset
strSQL = "SELECT member, lastpromptdate from tblUsers where member=" & """" & strUser & """" & ";"
Set rst = db.OpenRecordset(strSQL)
If rst.RecordCount <> 0 Then
rst.MoveFirst
' Assuming that the member field is unique for each user
' if we found one then check the date and display the
' prompt and update the
' lastpromptdate if needed.
If Date >= rst!lastpromptdate Then
' Write code to show whatever prompt you want here
rst.Edit
rst!lastpromptdate = Date
rst.Update
End If
Else
' If the sql found no user then we need to add
' this new user to the table.
rst.Add
rst!member = strUser
rst!lastpromptdate = Date
rst.Update
End If
Set db = Nothing
Set rst = Nothing
Steve King Growth follows a healthy professional curiosity
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.