Hi, I am using Access 2007 and I am trying to do something really simple I have a form with two text boxes and a button. When the user press the button if the box is blank a message will be display. If the user inputs his her name another message will be display with that info. I have the code below, however I do not understand why the code does not run. I am writing the code under the button. Please help. Thanksss
Option Compare Database
Option Explicit
Private Sub Command4_Click( )
If IsNull(Me.txtFi rst.Value) Or IsNull(Me.txtSe cond.Value) Then
MsgBox "Is Blank"
Else
MsgBox "Your name is" & Me.txtFirst.Val ue & "And your age is" & Me.txtSecond.Va lue
End If
End Sub
Option Compare Database
Option Explicit
Private Sub Command4_Click( )
If IsNull(Me.txtFi rst.Value) Or IsNull(Me.txtSe cond.Value) Then
MsgBox "Is Blank"
Else
MsgBox "Your name is" & Me.txtFirst.Val ue & "And your age is" & Me.txtSecond.Va lue
End If
End Sub
Comment