Hi, hopefully this is the right forum to post to.
Here's the background:
I have three controls on an unbound form:
1. Text box that gets its value from a combo box whose row source is a query
2. I have another combo box whose row source is a table
3. I have a check box
What I want is to have control # 2 be set to whatever value is in control # 1 whenever control # 3 is Not checked. If control # 3 is checked, I want to set the focus to control # 2 to have the user select the appropriate response.
Here's the code I have but only 1/2 of it is working. Basically if the check box is selected, it will perform the set focus...but if it is unselected, it doesn't default the value to control # 1. Do you think it has to do with the combo's row source?
If Me.chkYes.Value = True Then
comboA.SetFocus
Else
comboA.Value = Me.txtA.Value
End If
Any help is greatly appreciated! Thanks!
Here's the background:
I have three controls on an unbound form:
1. Text box that gets its value from a combo box whose row source is a query
2. I have another combo box whose row source is a table
3. I have a check box
What I want is to have control # 2 be set to whatever value is in control # 1 whenever control # 3 is Not checked. If control # 3 is checked, I want to set the focus to control # 2 to have the user select the appropriate response.
Here's the code I have but only 1/2 of it is working. Basically if the check box is selected, it will perform the set focus...but if it is unselected, it doesn't default the value to control # 1. Do you think it has to do with the combo's row source?
If Me.chkYes.Value = True Then
comboA.SetFocus
Else
comboA.Value = Me.txtA.Value
End If
Any help is greatly appreciated! Thanks!