i'm using this code

If txtCashTendered.Text = "" Then
            MsgBox("Input Amount First!")
            txtCashTendered.Focus()
            Exit Sub
        End If
        If ctbTotal.Text < txtCashTendered.Text Then
            Try
                Dim x
                x = MsgBox("Finalize Transaction?", MsgBoxStyle.YesNo)
                If x = vbYes Then
                    txtCashChange.Text = Format(txtCashTendered.Text - ctbTotal.Text, ".00")
                    FinalizeTransaction()
                End If
            Catch ex As Exception
                MsgBox("Create a transaction first!")
                Exit Sub
            End Try
        Else

            MsgBox("The amount you entered is invalid!")
            txtCashTendered.Focus()
            Exit Sub
        End If

why is it returning false on the line

If ctbTotal.Text < txtCashTendered.Text

when the value of ctbTotal.text is 60.00 and txtCashTendered.text is 100?

Take the values and compare not text.

okay.. i tried another way around and it works.. thanks btw..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.