Topic: need help code

if frmEmployee.CheckBox1 = 'Yes' then Form1.Edit1.Color := clRed
             else Form1.Edit1.Color := clGreen;

if frmEmployee.CheckBox2 = 'Yes' then Form1.Edit2.Color := clRed
             else Form1.Edit2.Color := clGreen;

if frmEmployee.CheckBox3 = 'Yes' then Form1.Edit3.Color := clRed
             else Form1.Edit3.Color := clGreen;

Re: need help code

if frmEmployee.CheckBox1.Checked then Form1.Edit1.Color := clRed
             else Form1.Edit1.Color := clGreen;

if frmEmployee.CheckBox2.Checked then Form1.Edit2.Color := clRed
             else Form1.Edit2.Color := clGreen;

if frmEmployee.CheckBox3.Checked then Form1.Edit3.Color := clRed
             else Form1.Edit3.Color := clGreen;
Dmitry.

Re: need help code

thanks Dmitry.
but i get another problem when i close my sample project and open againe all CheckBox to be not sellect i mean no save data CheckBox on database . please help me

Re: need help code

sample project

Post's attachments

Attachment icon Color Grid.zip 336.93 kb, 413 downloads since 2016-04-15 

Re: need help code

megood70 wrote:

thanks Dmitry.
but i get another problem when i close my sample project and open againe all CheckBox to be not sellect i mean no save data CheckBox on database . please help me

You have not created database fields for your checkboxes.
Fixed project attached.

Post's attachments

Attachment icon Color Grid_fixed.zip 7.83 kb, 432 downloads since 2016-04-15 

Dmitry.

Re: need help code

thanks Dmitry