New Record, Clear Checkbox on form

Certified

Board Regular
Joined
Jan 24, 2012
Messages
189
I have a form with the following items:
  • - Comments (Textbox)
  • - Additional Info (Textbox)
  • - Updated Comments (Textbox)
  • - Checkbox


The first two textboxes control source a query. The last textbox (Updated comments) is calculated.

The calculation is as follows:

If checkbox is true then updated comments = Comments + additional info. If not, updated comments is = comments.

Here is my issue:

If I check the box for the first record, all of the following records checkbox is also checked (True). How can I make the checkbox default value false when I got to a new record?

thanks!
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
63,296
Office Version
  1. 365
Platform
  1. Windows
Since the CheckBox is unbound, it is not attached to anything, so the value doesn't change as you move from record-to-record. So you want it to reset to "unchecked" every time it moves to another record (whether new of existing).

We can use some VBA in the On Current event of the Form to do that. If the checkbox was named Check1, here is what that code would look like:
Code:
Private Sub Form_Current()
    Me.Check1 = False
End Sub
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
63,296
Office Version
  1. 365
Platform
  1. Windows
You are welcome!

I am little curious though, what purpose does this serve? Since neither the checkbox nor the calculated field are bound, it only changes it on the form at that time (no changes are permanent).
Are you printing the Form or something like that?
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,836
Messages
5,833,906
Members
430,242
Latest member
Bancam

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
Top