This may seem simple to someone but not to me!

I have a Delphi app and am using a Sybase DB. I have two combo boxes one of which contains all the groups in a database and one of which contains all the tables in the database.

There are four checkboxes on the form: Select, Insert, Update and Delete. There is also a button that when clicked will grant the group selected in the combo box rights on the table selected in the other combo box depending on which check box(es) is/are selected.

What I cannot figure out is how to automatically fill in the checkboxes by pulling the groups rights from the database. For instance, if a group and a table are selected and that group already has Select rights on that table, the Select check box should be filled in so the user will know that group already has select rights.

Please help or offer advice!

Thanks! )