The AfterUpdate event of the control does not fire unless the user actually
updates the control.
In any case, you cannot use the control's event to prevent null. You have no
way to know if the user will ever visit the control.
Instead, use the BeforeUpdate event of the *form*
Or, if you don't want to write code, just open the table in design view, and
set the field's Required property to Yes.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Kirk P." <(E-Mail Removed)> wrote in message
news:5CE9AA70-9346-4937-960E-(E-Mail Removed)...
> I've got this code in the After Update event of a text box:
>
> If IsNull([BusUnit]) Then
> MsgBox "You must enter a BU.", vbExclamation
> Cancel = True
> End If
>
> BusUnit is a text field with Allow Zero Length property set to No. I
> would
> expect if I tab past the text box, the AfterUpdate event would fire and I
> would get the MsgBox. Nothing is happening. What's wrong?