The code below checks for unapproved pledges in a table and notifies the user if there are unapproved pledges.However,i would like to display all the unapproved PledgeIDs to the user through a message box. Kindly assist
sql = "SELECT PledgeID FROM tblpledges WHERE Status=@status"
command = New OleDbCommand(sql, connection)
command.Parameters.Add(New OleDbParameter("@status", OleDbType.VarChar)).Value = "Unapproved"
reader = command.ExecuteReader
If reader.HasRows Then
errmsg = "You Have Some Unapproved Pledges"
End If
If errmsg <> "" Then
MessageBox.Show(errmsg)
Return False
Else
Return True
End If