I have two comboboxes that I control the state of (enabled/disabled) with two check boxes. When I check one of the boxes the combobox relating to that check box gets enabled and allows a user to make a selection.
I put the code in the Click event of the check box. Here is the snippet I'm using:
If Me!cxboxNonConServ Then
Me!cbReason.Enabled = True
Else
Me!cbReason = Me!cbReason.OldValue
Me!cbReason.Enabled = False
End If
The problem arises when I scroll to a new record on my data entry form. The new record inherits whatever state the check boxes and comboboxes were in on the previous record. So if one was checked, it stays checked instead of going back to the default state of unchecked, and the combo box will stay enabled instead of reverting to disabled.
Are there any good work arounds for this? The only thing I've thought of so far is disabling the ability to scroll to the next record and adding a button for entering new records. My idea doesn't seem like a very good one and I'm not sure how to implement it.
Any suggestions?
Thanks for taking the time to read and help with this.
I put the code in the Click event of the check box. Here is the snippet I'm using:
If Me!cxboxNonConServ Then
Me!cbReason.Enabled = True
Else
Me!cbReason = Me!cbReason.OldValue
Me!cbReason.Enabled = False
End If
The problem arises when I scroll to a new record on my data entry form. The new record inherits whatever state the check boxes and comboboxes were in on the previous record. So if one was checked, it stays checked instead of going back to the default state of unchecked, and the combo box will stay enabled instead of reverting to disabled.
Are there any good work arounds for this? The only thing I've thought of so far is disabling the ability to scroll to the next record and adding a button for entering new records. My idea doesn't seem like a very good one and I'm not sure how to implement it.
Any suggestions?
Thanks for taking the time to read and help with this.