Prevent duplicate entry in a subform

I just saw your post. I don't understand the calculated fields.
I modified the subform as per the attached jpg. I think it now prevents deletes.
 

Attachments

  • DisallowDelete.jpg
    DisallowDelete.jpg
    97.8 KB · Views: 209
Thank you for the quick reply. It isn't that I don't want to delete any record, just don't want the user to delete the entry by highlighting it and hitting delete, only by right click and then delete record. The calculated fields are not pertinent to this problem. I just am concerned with the method of deleting entries in the languages subform.
 
After another several hours at this I think I have come up with a solution, although I do not know if it is optimal. Using the On Got Focus and On Lost Focus events I locked the control. I also had a Message Box pop up telling the user how to delete the record.

If Not IsNull(Me.Control) Or Me.Control = "" Then
Me.Control.Locked = True/False (depending on event)
End If

If there is a better way of doing this, please let me know. I am always open to suggestions.
 
You have it marked SOLVED, so I take it that everything is OK.
 
It was marked "solved" on the post of several months ago. Just wanted to know if my solution to prevent delete is optimal. Thanks.
 
I don't know about optimal, but if it works for you, (and you know the business and the database better than anyone) - then I'd accept it and move to the next issue.

Are there any associated problems --too slow...?
 
No, there weren't any problems. I just tend to over think things. And thanks for the advice. and I will move on to the next issue which I am sure will come up. Thanks again.
 

Users who are viewing this thread

Back
Top Bottom