i want to change the backcolor for buttons depends on information from database,
i have form has multiple buttons like this picture bellow.
I have a database table for shops (stores),There is a column in this table that contains the shop number and a column for its status : Yes or No (if rented or empty)
in the model Each shop has a button and this button named as the number of the store number in the database
How can I do for loop to Retrieve store data from the database
and changes the color of the button depends on the data from the database if it is empty or rented.