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 

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 2 Years Ago by Shark_1

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 article has been dead for over six months. Start a new discussion instead.