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

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
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
 
Upvote 0
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?
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,816
Members
449,049
Latest member
cybersurfer5000

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