Almir wrote:
This db i created has been driving me nuts.
Its possible the db is a figment of your imagination.
I have this one table
LOCATIONS, and in the data entry forms, the user is suppose to change
the locations of the equipment or set a location when first entered. I
set the property not to expand and limit to list, yet they somehow
edit the data there anyways. I want to prevent that. I want them to be
able to choose the options in combo box (with data from table
locations) but not edit the locations it self (the choices)...the
locked option is not going to work because it doesn't let the user to
change from location to location...it needs to be able to do that but
not edit the listing (the list it self) help anyone...
Is the field they are updating a text box? Or is the field a Combo box?
If it is a combo box, you Set Limit To List to true/yes In the NotInList
event, you could enter something like
Msgbox "Select a location from the list."
Response = acdataerrcontinue
Now if you have a textbox, in the BeforeUpdate event you could do
something like this
Dim varLoc As Variant
varLoc = Dlookup("YourLocationTableFieldName", _\
"LocationTableName","YourLocationTableFieldNam e = " &
Me.YourLocationTableFieldName
If IsNull(varLoc) Then
msgbox "Please don't enter new locations"
Cancel = True
Endif
Due to your frustration, you didn't cover your problem suffieciently. Let
us know if you have a combo, a text box, both text and combo, how the data
is selected in the combo...whatever else that will help us in helping you.