Flags

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lee123
    Contributor
    • Feb 2007
    • 556

    Flags

    i have sufed the web and read some of the books i have bought throught the year but i can't seem to find how to set a flag in my application can someone help me and give me an idea about how this can be done in visual basic 6 or is there circumstancese to doing this

    lee123
  • lee123
    Contributor
    • Feb 2007
    • 556

    #2
    this the code i want a flag in it but as you can see i don't understand the flagging. in this code i don't want the msgbox in the second half to show up until all the information is answered how can i do this with a flag:

    Code:
    Private Sub txtAmountPaid_LostFocus()
    Dim response As String, flags As Integer
         txtAmountPaid.Text = FormatCurrency(txtAmountPaid)
    If OptMoneyOrder.Value = True Then
        response = MsgBox("Is This a Money Order?", vbYesNo + vbQuestion, "Money Order")
        If response <> vbYes Then Exit Sub
        txtMoneyOrderNumber.SetFocus
    End If
    If txtAmountPaid.Text = True Then
        flags = response
        response = MsgBox("Is there Or Was there a Reference Number With or for this bill?", vbYesNo + vbQuestion, "Reference Number")
        If response = vbYes Then
        FReferenceNumber.Visible = True
        txtReferenceNumber.Visible = True
        txtReferenceNumber.SetFocus
    Else
        lblMessage.Visible = True
        lblMessage.FontSize = 40
        lblMessage.Alignment = 2
        lblMessage.FontBold = True
        lblMessage.Caption = "Complete"
    End If
    End If
    End Sub
    Did I Do this right because it doesn't work. the "txtamountp aid" is a textbox that is used also with another "opt control" (Cash) option this on works fine but when i click on the moneyorder option after i enter in the amount the second msgbox appears. i don't want it to appear until they either chose a yes or no value. i think i explained this right?

    Comment

    Working...