A
Angi
Is there such a thing as text box option group?? ie: You type in one
box and the others have to stay empty...one or the other type thing. I
don't think there's such a thing, so I wrote the following if statement
but I get the msgbox when there's only field with data. I put a break
in to see where the problem was and it was the last elseif
(txtcophone). There is only data in the txtCoCOID (first If). I've
even disabled the other fields to see if that helped...it didn't. What
am I doing wrong or what is the better way to do this? TIA!
If Not IsNull(Me.txtCoCOID) And Not IsNull(Me.txtCoPhone) Or Not
IsNull(Me.cboCoName) Then
If MsgBox("There is more than one field with information.
Please choose only one field to search for.", vbCritical + vbOKOnly,
"Error!") Then
End If
ElseIf Not IsNull(Me.cboCoName) And Not IsNull(Me.txtCoCOID) Or Not
IsNull(Me.txtCoPhone) Then
If MsgBox("There is more than one field with information.
Please choose only one field to search for.", vbCritical + vbOKOnly,
"Error!") Then
End If
ElseIf Not IsNull(Me.txtCoPhone) And Not IsNull(Me.cboCoName) Or
Not IsNull(Me.txtCoCOID) Then
If MsgBox("There is more than one field with information.
Please choose only one field to search for.", vbCritical + vbOKOnly,
"Error!") Then
End If
End If
box and the others have to stay empty...one or the other type thing. I
don't think there's such a thing, so I wrote the following if statement
but I get the msgbox when there's only field with data. I put a break
in to see where the problem was and it was the last elseif
(txtcophone). There is only data in the txtCoCOID (first If). I've
even disabled the other fields to see if that helped...it didn't. What
am I doing wrong or what is the better way to do this? TIA!
If Not IsNull(Me.txtCoCOID) And Not IsNull(Me.txtCoPhone) Or Not
IsNull(Me.cboCoName) Then
If MsgBox("There is more than one field with information.
Please choose only one field to search for.", vbCritical + vbOKOnly,
"Error!") Then
End If
ElseIf Not IsNull(Me.cboCoName) And Not IsNull(Me.txtCoCOID) Or Not
IsNull(Me.txtCoPhone) Then
If MsgBox("There is more than one field with information.
Please choose only one field to search for.", vbCritical + vbOKOnly,
"Error!") Then
End If
ElseIf Not IsNull(Me.txtCoPhone) And Not IsNull(Me.cboCoName) Or
Not IsNull(Me.txtCoCOID) Then
If MsgBox("There is more than one field with information.
Please choose only one field to search for.", vbCritical + vbOKOnly,
"Error!") Then
End If
End If