Access Form Multiple Checkbox's auto-populate the 3rd based off the 1st and 2nd Checkbox

Mac1206

Board Regular
Joined
Jun 3, 2016
Messages
184
I have 3 Checkboxes on my form and I'm trying to make the third checkbox automatically populate if the first 2 are checked, see below...Any suggestions on how this can be completed? For the Third checkbox Field C1 on my Form, I need it to auto-populate with True or Yes or -1 based off the 1st 2 being checked and if one of the 1st 2 is not then leave it blank...

Does this need to be in the Control Source, Default Value, or an expression built into the query for the form in order to get Field C1 to populate to -1?

IIf([A1]="Yes" And [B1]="Yes",[C1]=-1,"")
 
You could always put in breakpoints in the code
F9 where your cursor is, then step through
Why, in this case? I don't think either suggestion has been implemented yet, so there's no code to check, and as of yet, no error to look for.
Re post 11, Date() is required in sql; Date in vba.
Although not really the same, people get confused over IsNull in vba, Is Null in sql as well. IsNull is a function. Is is an operator checking for Null.
 
Upvote 0

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Forum statistics

Threads
1,214,784
Messages
6,121,535
Members
449,037
Latest member
tmmotairi

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