Tupacmoche
Registered User.
- Local time
- Yesterday, 21:53
- Joined
- Apr 28, 2008
- Messages
- 291
Hi Form Masters,
I have a combobox created with the Access wizard that works fine except when, I add a new record to the table. Here is the code:
I have a sproc that adds a row to the table that is linked (SQL 2008 rs) this works fine and is not the issue since the records are always added. The issue is that when I try to select the new record from the combbox a different row is selected. This doesn't effect existing records. But if I restart the application then there is no issue it selects the new record. Clearly, I don't want user to have to restart the application every time they add a new row. Has anyone encountered this issue and know how to fix it?
I have a combobox created with the Access wizard that works fine except when, I add a new record to the table. Here is the code:
Code:
Private Sub CboFind_AfterUpdate()
On Error GoTo CboFind_AfterUpdate_Err
DoCmd.SearchForRecord , "", acFirst, "[Upload_Number] = " & Str(Nz(Screen.ActiveControl, 0))
CboFind_AfterUpdate_Exit:
Exit Sub
CboFind_AfterUpdate_Err:
MsgBox Error$
Resume CboFind_AfterUpdate_Exit
End Sub