Good Morning,
Thank you in advance for the help with this issue.
I am trying to write a portion of code that will require one combobox (dedicatedaccounts) to have an account selected from the list when another combobox (dedicated) says Yes. If dedicated is Yes and there is nothing in dedicatedaccounts I am putting in a msgbox telling the user that it must be populated otherwise if dedicated is No then there will be no msgbox if dedicatedaccounts is blank. Here is what I have so far, not sure if I am on the right path or not. The other msgboxes all work fine.
Thank you in advance for the help with this issue.
I am trying to write a portion of code that will require one combobox (dedicatedaccounts) to have an account selected from the list when another combobox (dedicated) says Yes. If dedicated is Yes and there is nothing in dedicatedaccounts I am putting in a msgbox telling the user that it must be populated otherwise if dedicated is No then there will be no msgbox if dedicatedaccounts is blank. Here is what I have so far, not sure if I am on the right path or not. The other msgboxes all work fine.
Code:
If Me.dedicated.Value = Blank Then
MsgBox ("You must select whether it is dedicated or not.")
Else
If Me.um.Value = Blank Then
MsgBox ("You must select a Unit Manager.")
Else
'???(here is where I get lost)
If Me.dedicated.Value = "Yes" Then
Me.dedicatedaccounts.Value =
Exit Sub