Share via

Requery Recordset after adding a record

Anonymous
2016-07-17T16:42:24+00:00

I have a form to keep track of contacts. When I add a new contact and go to new record I want to requery the recordset so that the record I just added is put into the queries sort order and associated combo box lists are refreshed to show the new record.

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

10 answers

Sort by: Most helpful
  1. ScottGem 68,830 Reputation points Volunteer Moderator
    2016-07-17T23:42:19+00:00

    I would suspect there is some code in the On Current event that is causing this problem. The only thing I could causing it is some code.

    Is there a Debug button on the error? If so press it and past the code causing the error.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2016-07-17T20:31:26+00:00

    It's still sort of works. I now am able add the record and have combo box list update when I go to another record

    The going to another record, using navigation buttons, works as long as I use the first record or previous record buttons. If try to use Next, Last or New buttons I get that error "You Can't go to the Specified Record" and when click OK everything is fine. The User, however will have be able to click on next record or add new record buttons with that error message.

    Any thoughts?

    Was this answer helpful?

    0 comments No comments
  3. ScottGem 68,830 Reputation points Volunteer Moderator
    2016-07-17T18:19:51+00:00

    Try requerying the search combo directly.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2016-07-17T17:54:46+00:00

    That kind of works!

    When I go to new record (new record button) and add Contact data and then click next or new record I get this error message "You Can't go to the Specified Record".

    I closed the message and my added record shows up in the correct query order but my "Select a record" combo box does not have the new name. I have to close the form and reopen it to see the correct combo box list. One issue that related to to combo box problem is that if I delete records they still show on the list but only as "#Deleted"

    Was this answer helpful?

    0 comments No comments
  5. ScottGem 68,830 Reputation points Volunteer Moderator
    2016-07-17T16:56:37+00:00

    In the After Insert event put Me.Requery

    Was this answer helpful?

    0 comments No comments