hi
I have my database forms set to not allow deletions, because in my experience people tend to do this by accident.
I have since found myself haveing to do more systems admin than I would like, and trying to set up a way to allow others to delete under certain cicumstances.
I have set up a form with 1 control, password
there is a button to then open my Main form and set the allowdeletions property to True. I then needd to do the same with a number of subforms.
Here is the code so far:
the form opens fine (providing the password is "edit") but the allowdeletions property does not change.
Is my method wrong in any way?
Thanks
Kev
I have my database forms set to not allow deletions, because in my experience people tend to do this by accident.
I have since found myself haveing to do more systems admin than I would like, and trying to set up a way to allow others to delete under certain cicumstances.
I have set up a form with 1 control, password
there is a button to then open my Main form and set the allowdeletions property to True. I then needd to do the same with a number of subforms.
Here is the code so far:
Code:
Private Sub Command2_Click()
If [Password] = "edit" Then
DoCmd.OpenForm "frmMain"
Forms!frmMain.SetFocus
Me.AllowDeletions = True
Forms!frmMain!sformCasenotes.SetFocus
Me.AllowDeletions = True
Else
MsgBox "password incorrect", , "Password Incorrect"
End If
End Sub
the form opens fine (providing the password is "edit") but the allowdeletions property does not change.
Is my method wrong in any way?
Thanks
Kev