Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7946347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T01:07:28+00:00 2026-06-04T01:07:28+00:00

Okay, cannot find anything online about this error, so here goes. Using Access 2003.

  • 0

Okay, cannot find anything online about this error, so here goes.

Using Access 2003. I have a form that has a combobox dropdown. Users choose from the dropdown, and the VBA code looks at a particular table to see if data already exists. If it finds it, it displays the data associated with the record. If it does not find it, it adds a new record to the table, then tries to display the new data. The problem is that when using the following code, it does not display the new data, unless I add in Me.Requery. However, if I do that, it then gives me the above error if I try to do the same process again.

So, how can I get the data to display after adding without the above error?

Here is the relevant code…

' Find the record that matches the control.
Dim rs As DAO.Recordset

Set rs = Me.Recordset.Clone

'if no record found, then add a default record
If IsNull(Combo119) Then
    Set rs = CurrentDb.OpenRecordset("SELECT * FROM [Master Reject Data]")
    rs.AddNew
    rs.Fields("production Date") = Date
    rs.Fields("Work Order #") = Combo119.Column(0)
    rs.Fields("Product Type") = ""
    rs.Fields("Shift") = ""
    rs.Fields("Line") = ""
    rs.Fields("# Produced") = 0
    rs.Fields("Reject Type") = ""
    rs.Fields("Reject Quantity") = 0
    rs.Fields("Reject Category") = "Rejection"
    Dim tRec As Long
    tRec = Combo142.ItemData(0)
    rs.Fields("Report Number") = tRec
    rs.Update
    Me.Requery 'this is the line I added to try to get the data to appear
    Set rs = Me.Recordset.Clone
    rs.FindFirst "[Report Number] = " & tRec 'navigate to the newly added record
Else
    rs.FindFirst "[Report Number] = " & Nz(Me![Combo119], 0) 'navigate to the record with the requested report number
End If
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T01:07:30+00:00Added an answer on June 4, 2026 at 1:07 am

    Sorry, found the issue after looking at it again. The problem is that the Me.Requery statement needs to be Me.Recordset.Requery. After doing that and adding Me.Refresh, it works as intended.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay, I have done a bit of searching online and found this thread, but
I cannot for the heck of it find why this is throwing an error!
Okay, so I have torn what I had down and am rebuilding it, here's
Okay, I cannot figure out what I'm doing wrong here... Take the following jQuery
Okay a few rules: No, I cannot install Strawberry Perl on this system. I
Okay, I just cannot figure this one out. After looking and re-looking at my
Okay this is about my fifth thread on the topic because I'm balls-out lost
Okay, so here's the situation: I have an application which uses SDL and OpenGL.
Okay, so I'm pretty new to xcode but I cannot find something specific to
Okay, I've looked around a bit, and I cannot seem to find the answer.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.