Avoiding data alteration in drop downs

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

Guest

How can prevent the user from altering the data (under lying table data) in drop downs? This has been a cause of frustration for some time now

I've done the following to

Private Sub Form_BeforeUpdate(Cancel as Integer
If Me!cboShift & "" = "" The
MsgBox "Please select a value from This Combo", vbOKOnl
Me!cboShift.SetFocu
Cancel = Tru
End I

End Su

But here, I get a cannot use set focus to control in the beforeUpdate error. Any ideas??????? HELP!
 
There is a property in the combo box called LimitToList, which will do just
what you want.

--
--Roger Carlson
www.rogersaccesslibrary.com
Reply to: Roger dot Carlson at Spectrum-Health dot Org

Russ said:
How can prevent the user from altering the data (under lying table data)
in drop downs? This has been a cause of frustration for some time now.
I've done the following to:

Private Sub Form_BeforeUpdate(Cancel as Integer)
If Me!cboShift & "" = "" Then
MsgBox "Please select a value from This Combo", vbOKOnly
Me!cboShift.SetFocus
Cancel = True
End If

End Sub

But here, I get a cannot use set focus to control in the beforeUpdate
error. Any ideas??????? HELP!
 
Back
Top