Hi
I must be needing a break already! I cannot see a quick way to do this and all my attempts have failed.
I have a textbox on a data entry form that can only be accepted if it meets one of three conditions:
It is null
It says "Yes" (or "yes")
It says "No" (or "no")
I can get around the capitalisation by using string conversion and vbProper in the before update event for the textbox so that is OK.
My latest failed attempt is (remarked out since it doesn't work!)
I think I need to run a series of sequential tests rather than trying to do what I am doing. I wondered if anyone had a set piece for what cannot be that unusual.
Thanks
I must be needing a break already! I cannot see a quick way to do this and all my attempts have failed.
I have a textbox on a data entry form that can only be accepted if it meets one of three conditions:
It is null
It says "Yes" (or "yes")
It says "No" (or "no")
I can get around the capitalisation by using string conversion and vbProper in the before update event for the textbox so that is OK.
My latest failed attempt is (remarked out since it doesn't work!)
Code:
' Check entry boxes are correctly filled in
' If Not IsNull(Me.txtSupColId) Or Me.txtSupColId <> "" Then
' If Me.txtSupColId <> "Yes" Or Me.txtSupColId <> "No" Then
' MsgBox "You must enter appropriate text.", vbCritical, "Appropriate entry required"
' Me.txtSupColId.Undo
' Me.txtSupColId.SetFocus
' Exit Sub
' End If
' End If
I think I need to run a series of sequential tests rather than trying to do what I am doing. I wondered if anyone had a set piece for what cannot be that unusual.
Thanks