0
        MsgBox("You have entered an invalid department")
            End Select

            'Display the new total for each department
            LblTotalpayroll.Text = "Payroll Totals:" & vbNewLine _
                "Management:" &
                dbManagementPayroll.ToString & vbNewLine & _
                "sale:" &
                    dbSalePayroll.ToString & vbNewLine & _
                    "processing:" &
                    dbprocessingpayroll.ToString & vbNewLine & _
                    "Phone:" &
                    dbphonepayroll.ToString & vbNewLine 
        Else
            MsgBox("The payroll amount entered is not valid")
        End If
    End Sub




its showing error (end of statement expected) on ("management:")
how can i solve it > help me please 
3
Contributors
2
Replies
11
Views
2 Years
Discussion Span
Last Post by Reverend Jim
0

Wrong sytax. It should be

LblTotalpayroll.Text = "Payroll Totals:" & vbNewLine & _
                "Management:" & dbManagementPayroll.ToString & vbNewLine & _
                "sale:" & dbSalePayroll.ToString & vbNewLine & _
                "processing:" & dbprocessingpayroll.ToString & vbNewLine & _
                "Phone:" & dbphonepayroll.ToString & vbNewLine 

Edited by Shark_1

0

By the way, if the line of code is unambiguously not complete (for example, if it ends with "&") then you can omit the ending underscore. Your code would then be

LblTotalpayroll.Text = "Payroll Totals:" & vbNewLine &
            "Management:" & dbManagementPayroll.ToString & vbNewLine &
            "sale:" & dbSalePayroll.ToString & vbNewLine &
            "processing:" & dbprocessingpayroll.ToString & vbNewLine &
            "Phone:" & dbphonepayroll.ToString & vbNewLine 
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.