In the AfterUpdate event of whatever control is being used to select the member, Use dLookup() to find the member's expiration date. If it is < today's date, then you can send a notice (email) to the logged in employees that help is needed and then pop up a model form where the password and information to renew can be captured. Since the form is model, the app is essentially locked until someone enters the requested information and it is validated. If they enter an invalid password and hit the enter button, you will display an error message and redisplay the model form. Obviously, you also need to give the member instructions.
You might want to include a wider ranging check so that the member is allowed to log in but gets a notice each time for a week before his membership actually expires.
Hi, thank you for your persistance with me, I am trying the following code to try and get a form to pop up.
my table is called 'Members', the expiry field is called 'MemberExpiry' and the members ID field is 'MemberID'. The pop up form is called 'red'
the first part looks up the the member info from a search box, my part is in the trial code section and I cannot figure out the dlookup part. I have triedl googling, but still struggling.
Private Sub Combo42_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[MemberID] = " & Str(Nz(Me![Combo42], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
''''''''''trial code''''''''''
Dim varX As Variant
varX = DLookup("[MemberExpiry]", "Members" = "[MemberID] = " & Forms![Member]!MemberID)
If varX < Date Then:
DoCmd.OpenForm "red"
End If
'''''''''end of trial code'''''''''''
End Sub