checking for null entry in text box in vba word 2003

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ricardovillarroel
    New Member
    • Mar 2008
    • 1

    checking for null entry in text box in vba word 2003

    i am trying to check the text box for nulls once the user tabs over the text box. i do not want it to check for nulls when i click on okay. here is code. do i need to setfocus so it will go back to the text box?

    Private Sub txtArrivalDate_ AfterUpdate()

    Dim ArrivalDate As Date

    ArrivalDate = txtArrivalDate. Value

    If IsNull(ArrivalD ate) Then MsgBox ("Please enter a valid date.")

    End Sub
Working...