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 

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 
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.