Flyfish,
I don't know if this will work or not.
Instead of using the on current, on the command button that opens the form, put this in:
stdocname = formname
If (IsNull(Me.creator) Or CurrentUser( )= Me.creator Or IsInGroup(CurrentUser(), "test_admin") Then
docmd.openform stdocname,acnormal,,acformadd
else
docmd.openform stdocname,acnormal,,acformedit
end if
This way, when the user opens the form, all they can do is add new records. If you have a button on your form to delete the current record, then add this when they don't have authorization to delete:
me.deletecommandbutton.enabled = false
note: add it after the docmd.openform statement.
Like I say, I don't know if this will work for you. I think(oxymoron!) that it will work in both 97 and up.
Let me know!
Kevin
dartcoach
|