urjudo
asked on
Code for check box in Delete button on a Windows Form in VB.net
Hi Experts,
I have a question about the code for check box in VB.net visual Studio.
I have a Delete button in a windows form, I would lie to do is when users click the Delete button, it will automatically set the record to true in the SQL server instead remove the delete in SQL server. I have the field name RecDelete in the SQL table. I also placed this RecDelete field as a label on the form, but having trouble to figure it out the code. I tried Me.recdeletelbl.text = true in the Delete Button, but it doesn't work. and I tried me.recdelete.checked = true, it doesn't work either. any help would be appreciated.
Thanks
I have a question about the code for check box in VB.net visual Studio.
I have a Delete button in a windows form, I would lie to do is when users click the Delete button, it will automatically set the record to true in the SQL server instead remove the delete in SQL server. I have the field name RecDelete in the SQL table. I also placed this RecDelete field as a label on the form, but having trouble to figure it out the code. I tried Me.recdeletelbl.text = true in the Delete Button, but it doesn't work. and I tried me.recdelete.checked = true, it doesn't work either. any help would be appreciated.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Actually, you don't need button - just checking/unchecking checkbox will switch true/false RecDelete field
ASKER
@Ark,
Yes, both are works but I already have a button named "Delete", so I just place the code in the Delete button for users to click.
Thanks.
Yes, both are works but I already have a button named "Delete", so I just place the code in the Delete button for users to click.
Thanks.
In that case you may want make checkbox.enabled=false
Regards
Regards
ASKER
@Ark,
Yes, thanks for your reminding, in fact, I will not add the checkbox on the form. just leave on the table
Yes, thanks for your reminding, in fact, I will not add the checkbox on the form. just leave on the table
ASKER
Thank you.