Hi all,
I'm kind of going crazy trying to figure out exactly how to code this. I have a form with a combo box on it. I've created some code that evaluates the value of the combo box and checks that value against a date. If that date is earlier than today's date, it pops up a message warning them that the cut off date is past and that they can't add a new item.
The rub is I have security groups setup (about 10 of them). One of those groups is "delete data user". What I really need to have happen is for only people in this group to NOT get this warning. So "delete data users" should be able to proceed as normal and everyone else should get the message and be prevented from choosing that selection.
I have this code which is evaluating the date and if it's early than today it's popping up the warning:
Private Sub cbolngSchdTA_Change()
If DLookup("[datScopeFreeze]", "tblLookupTA", _
"[lngIDLookupTA] = Form![lngSchdTA]") <= Now Then
MsgBox "Warning: Scope is frozen for this TA. You cannot add new items. Please see your manager.", vbCritical
Me.cbolngSchdTA.Undo
End If
End Sub
What I can't figure out how to do is to only allow people in the group "delete data user" to bypass this code and to be able to choose that value and continue on.
Any help would be greatly appreciated.