Using Check boxes

RichFost

New Member
Joined
May 13, 2004
Messages
26
Hi,

I have a form in an access97 database which users of the database would go into to update data.

I want to put a check box into the form so that the user cannot click on the update button in my form until they have ticked the check box.

I don't know whether I can set it to disable the update button until the check box is ticked, or whether I can set it to hide the update button until the check box is ticked; either solution would work for me.

Can anyone help ?

Thanks.
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Hi RichFost,

Assuming 'Chk1' for your checkbox name, and 'Cmd1' for your button, the following:

Private Sub chk1_Click()

cmd1.Enabled = chk1.Value

End Sub

will enable/disable the button depending on whether or not the checkbox is checked.

You could use:

Private Sub chk1_Click()

cmd1.Visible = chk1.Value

End Sub

to make the button invisible/visible.

Hope this helps,
 
Upvote 0

Forum statistics

Threads
1,221,831
Messages
6,162,242
Members
451,756
Latest member
tommyw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top