[Access 2010] Require field entry if certain combobox value selected

While googling I found an entry from this forum very similar to my question. However the answer did not exactly work. I have a combobox that has just two choices "open" or "closed", if closed is chosen I want to require a text box (date) to be entered.

The suggested code I used is:

Private Sub opcl_BeforeUpdate(Cancel As Integer)
If opcl = "closed" Then
MsgBox "Please enter date closed", vbOKOnly
compdate.SetFocus
Cancel = True
End If
End Sub

However, this produces the following error message:

Run-Time error 2108
You must save the field before you execute the GoToControl action, the GoTo mtehod, or the SetFocus method.

Thanks in advance!

PS newbie to prgramming in access