Combo Box allowing user to edit list values

Lateral

Registered User.
Local time
Today, 00:43
Joined
Aug 28, 2013
Messages
388
Hi guys

Newbie again :)

Using Access 2007.

I have a subform in a form that has a Combo Box that is linked (not sure is that is the correct term) to a field called PartID in a table containing a list of Parts. The list show the Name of the Part (PartName) and other fields.

This all works great except that it allows the user to change the text in the Name of the Part (PartName) field directly from the Combo Box!!!! I really don't want this to be able to happen.

I have the "Limit to List = Yes" but it still allows the user to change the value...The "Allow Value List Edits = No"...

What am I doing wrong or missing?

Thanks
Regards
Greg
 
You could use a listbox instead as that isn't editable by default.

Does an error message pop up if they try and add something?

You could intercept keyboard presses and only allow certain values

Private Sub COMBO_KeyDown(KeyCode As Integer, Shift As Integer)
KeyCode = 0
End Sub

--
Set the combobox Style property to 2-fmStyleDropDownList
 
Hi Alex,

Nope, no error message.

I just tried your key interecpt code and it works great!

Thanks mate

Regards
Greg
 

Users who are viewing this thread

Back
Top Bottom