Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2009
    Posts
    16

    Question Unanswered: VBA .. Small piece of code but pain for me ..

    whats wrong with this code ??

    first three lines complies skips forth then last two compile ...

    Private Sub Combo1067_AfterUpdate()

    If Me.Combo1067 = "Fragile" Then
    If Me.txtOutcome_Flag.Value = Null Then
    txtOutcome_Flag.Text = "bingo"
    End If
    End If

    End Sub

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    I don't know
    short of putting a watch on it and making sure you test the various values and step through the code
    normally I'd expect to see an or else statement, or soemthign that positivle sets a value

    Code:
    If Me.Combo1067 = "Fragile" Then
      If Me.txtOutcome_Flag.Value = Null Then
        txtOutcome_Flag.Text = "bingo"
      else
        txtOutcome_Flag.Text="state1"
      End If
    else
            txtOutcome_Flag.Text="state2"
    End If
    or
    Code:
    txtOutcome_Flag.Text=""
    If Me.Combo1067 = "Fragile" Then
      If Me.txtOutcome_Flag.Value = Null Then
        txtOutcome_Flag.Text = "bingo"
      End If
    End If
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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