Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pop-Up Reminder

Status
Not open for further replies.

Dlynn

IS-IT--Management
Apr 17, 2001
12
US
I need a pop-up reminder to show every 30 days, how do I do this in Access 2000?

I have a field called member since, I want a reminder to pop-up every 30 days.
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top