Avoid delete

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am having this problem, which may not be a problem. But, for now, it is! What's happening is that I have a couple of applications in Access 97 that use a number of dropdown combo boxes to set values. The thing that keeps happening is that when ever the dropdown boxes are use, the user seems to be able to alter the underlying data by deleting or altering the data completely. Now, I've set the form's properties "Not To allow Deletes" but I still have the problem. It is driving me crazy

Is there a solution to this, or is it just a bug in Access 97. HELP!!!!!!!! I'm at my whit's ends
 
Have you tried to set the LIMITTOLIST property of the
combo box to true?
-----Original Message-----
I am having this problem, which may not be a problem.
But, for now, it is! What's happening is that I have a
couple of applications in Access 97 that use a number of
dropdown combo boxes to set values. The thing that keeps
happening is that when ever the dropdown boxes are use,
the user seems to be able to alter the underlying data by
deleting or altering the data completely. Now, I've set
the form's properties "Not To allow Deletes" but I still
have the problem. It is driving me crazy!
Is there a solution to this, or is it just a bug in
Access 97. HELP!!!!!!!! I'm at my whit's ends.
 
I am having this problem, which may not be a problem. But, for now, it is! What's happening is that I have a couple of applications in Access 97 that use a number of dropdown combo boxes to set values. The thing that keeps happening is that when ever the dropdown boxes are use, the user seems to be able to alter the underlying data by deleting or altering the data completely. Now, I've set the form's properties "Not To allow Deletes" but I still have the problem. It is driving me crazy!

Is there a solution to this, or is it just a bug in Access 97. HELP!!!!!!!! I'm at my whit's ends.

Are they actually deleting records, or are they replacing a non-NULL
value in fields in an existing record with NULL values? If so, Access
doesn't consider this to be "deleting" - it's just editing a record,
and replacing data in a field. You can prevent the user from replacing
the field with NULL by making it Required in the table design, or
using the Form's BeforeUpdate event to check:

Private Sub Form_BeforeUpdate(Cancel as Integer)
If Me!cboThisCombo & "" = "" Then
MsgBox "Please select a value from This Combo", vbOKOnly
Me!cboThisCombo.SetFocus
Cancel = True
End If
<etc. for the other combos>
End Sub
 
Back
Top