Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2003
    Posts
    11

    Unanswered: Problem with Null in an if statement

    What is happening when the IndividualText textbox is empty i.e Null it is skipping (IndividualText.Value = "Please Type Pay Number") and going to the else statement.

    Why is this?


    The code that i am suing is as follows.

    Private Sub Form_Current()

    If IndividualText.Value = Null Then
    IndividualText.Value = "Please Type Pay Number"
    Else
    Text721.SetFocus
    Text725.SetFocus
    Text729.SetFocus
    Text731.SetFocus
    Text733.SetFocus
    Text735.SetFocus
    Text737.SetFocus
    Text739.SetFocus
    Text741.SetFocus
    IndividualText.SetFocus
    Text754.SetFocus
    End If
    End Sub

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    With conditionals, you have to use the IsNull function to test with ...

    If IsNull(MyFieldHere) Then

  3. #3
    Join Date
    Oct 2003
    Posts
    11
    Thanks i knew i was daft. Isnull was what i wanted

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •