View Single Post
 
Old 03-14-2024, 06:43 AM
ccamm ccamm is offline Windows 10 Office 2021
Novice
 
Join Date: Mar 2024
Posts: 2
ccamm is on a distinguished road
Default Toggling control checkboxes to true when a value in a control drop down is selected

I'm assuming this is a simple one, but its one of those days where I am banging my head against the wall. I'm more used to building stuff in power apps, and it spoon feeding me a lot of things so I am not as familiar with the VBA in words and what the items are called and I have available

right so what I am trying to do is this.

I have a named Dropdown control called ROLE, within it there are 4 options a user can select.

lets call them

a,b,c,d

and dependant on which one they select i want it to toggle a number (8) of check boxes on or off. Its not a simple if a then cb1 & 2 are set to true, as some of the check boxes will be true for more than one of the drop down option.

Im assuming I need to run it as an If/else similar to this


Code:
 If ddbox.ROLE.title = "a" Then 
 cb1 = "True"
 cb2 = "True"
 Cb4= "True" 
 ElseIf ddbox.ROLE.title = "b" Then 
 cb1 = "True"
 cb4 = "True"
 Cb5= "True"
 ElseIf ddbox.ROLE.title = "c" Then 
  cb2 = "True"
  cb3 = "True"
  cb4= "True"
  cb6= "True"
  cb8= "True"
 ElseIf ddbox.ROL.title = "d" Then 
  cb2 = "True"

 End If 
End Function
help please?
Reply With Quote