Runtime Error 2427 on GotFocus Event
Posted on 2013-05-23
Very simple code below that checks to see if value is null and if so make the background red. This code is on a subform and has worked since I created this little database in 2008. Today I made some changes to a couple of other subforms and when going through error checking, when I got to this subform all of a sudden I am getting the Run-Time error 2427 - The expression you entered has no value. The Debug shows the error occurring on the line with the asterisks.
Can someone clue me in as to why this simple code no longer works? I have similar code on other forms in this same database that do NOT generate this code.
Private Sub ALChoice_GotFocus()
If IsNull(Me.ALChoice.value) Or Me.ALChoice.value = 0 Then ******
Me.ALChoice.BackColor = 255
Me.ALChoice.BackColor = 16777215