I have form with the following code that works great however, I want the user to be forced to select a new Accounting_Code if they change the County in the County combo box. Any suggestions? Right now it requeries the Accounting_Code combo box when the County is changed but there is nothing that forces the user to select a new accounting code therefore, allowing the user to save the entry with an incorrect Accounting_Code.
The row source for the combo box bound to the field County Code:
SELECT DISTINCT County FROM tbl_Accnt_code ORDER BY County
In the after update event of the combo box County, the code is Code:
Private Sub County_AfterUpdate()
Me.Accounting_Code.Requery
End Sub
And the row source for the "Accounting_Code" combo box is:
SELECT [AccountingCode] FROM tbl_Accnt_code WHERE [County] = Forms!frm_Expend.County ORDER BY [AccountingCode]