New Record, Clear Checkbox on form

Certified

Board Regular
Joined
Jan 24, 2012
Messages
181
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

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
57,034
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
57,034
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?
 

Watch MrExcel Video

Forum statistics

Threads
1,130,307
Messages
5,641,442
Members
417,209
Latest member
Agbarker

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