2nd time poster here but very helpful site. I have a project I am working on and have 2 comboboxes cascading (AdminCombo and AccountCombo)to display a set of records on the same form, no subforms. Boxes are working fine and the data comes up fine with my selection but when I created the 2nd box I used the wizard and chose the 3rd option "Find a record on my form based on the value I selected in my combo box" and it created an embedded macro that i converted to vba so I could add the requery code in the after update code but it is not working. Here is the code that was converted to vba. I have tried adding AdminCombo.requery and me.AdminCombo.requery too but the data in the second combobox does not change.
Private Sub AccountCombo_AfterUpdate()
On Error GoTo AccountCombo_AfterUpdate_Err
DoCmd.SearchForRecord , "", acFirst, "[EventAccount_Account] = " & "'" & Screen.ActiveControl & "'"
AccountCombo_AfterUpdate_Exit:
Exit Sub
AccountCombo_AfterUpdate_Err:
MsgBox Error$
Resume AccountCombo_AfterUpdate_Exit
End Sub
Any suggestions would be great.
Thanks,
rj
Private Sub AccountCombo_AfterUpdate()
On Error GoTo AccountCombo_AfterUpdate_Err
DoCmd.SearchForRecord , "", acFirst, "[EventAccount_Account] = " & "'" & Screen.ActiveControl & "'"
AccountCombo_AfterUpdate_Exit:
Exit Sub
AccountCombo_AfterUpdate_Err:
MsgBox Error$
Resume AccountCombo_AfterUpdate_Exit
End Sub
Any suggestions would be great.
Thanks,
rj