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

  • SEARCH
  • Home
  • 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 8596589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T00:42:55+00:00 2026-06-12T00:42:55+00:00

I’m trying to move to a record that has a certain ID. I tried

  • 0

I’m trying to move to a record that has a certain ID.

I tried the solution on this post: MS Access search for record by textbox instead of dropdown

but no success

Here’s my code

Private Sub btnShowPrevious_Click()
    Dim rs As DAO.Recordset
    Set rs = Me.RecordsetClone
    rs.FindFirst "[ID]=" & ParentID
    If rs.NoMatch Then
        MsgBox "Sorry, no such record '" & ParentID & "' was found.", _
               vbOKOnly + vbInformation
    Else
        Me.Recordset.Bookmark = rs.Bookmark
    End If
    rs.Close
End Sub

It always hit no match but parentID = 1 and there’s one record with ID = 1..

Anyone has an idea of what is wrong?

Thank you

The record source is this table:

CREATE TABLE [dbo].[ProposalFollowUp](
[ID] [int] IDENTITY(1,1) NOT NULL,
[ProposalID] [int] NOT NULL,
[MillID] [int] NULL,
[ClientID] [int] NULL,
[Comment] [nvarchar](max) NULL,
[Method] [nvarchar](128) NULL,
[Contact] [int] NULL,
[ContactDate] [datetime] NULL,
[Done] [bit] NOT NULL,
[CreatedBy] [nvarchar](50) NULL,
[CreatedDate] [datetime] NULL,
[ModifiedBy] [nvarchar](50) NULL,
[ModifiedDate] [datetime] NULL,
[EAIEmployee] [nvarchar](50) NULL,
[PersonInCharge] [nvarchar](50) NULL,
[ParentID] [int] NULL,

here’s a screenshot of the form properties

enter image description here

Finaly, if I show the navigation bar, I can see there’s a filter.
Probably because I open the form like this

DoCmd.OpenForm "ProposalsFollowUp", , , "[ID] = " & txtID, acFormEdit, acDialog

If I remove the filter, it works.

Alright
Here’s the final code

Private Sub btnShowPrevious_Click()
    Dim parent As Integer
    parent = ParentID
    Me.Filter = ""
    Dim rs As DAO.Recordset
    Set rs = Me.RecordsetClone
    rs.FindFirst "[ID]=" & parent
    If rs.NoMatch Then
        MsgBox "Sorry, no such record '" & parent & "' was found.", _
               vbOKOnly + vbInformation
    Else
        Me.Recordset.Bookmark = rs.Bookmark
    End If
    rs.Close
End Sub
  • 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-12T00:42:56+00:00Added an answer on June 12, 2026 at 12:42 am

    After checking everything obvious such as ensuring the recordset includes the data you are searching for and that there are no filters, you can consider a problem with the form. A filter is shown at the bottom of the form in Access 2010 and can be removed in VBA by:

    Me.FilterOn = False
    

    Or by clicking the filter button:

    form filter access 2010

    Odd things happening in a front-end are often due to corruption of some sort. You need to regularly back-up, compact and repair and decompile when you are developing. If you have linked tables, it is often a good idea to refresh the links.

    If you create a form you do not want to lose and it becomes corrupt, you can copy to a new form with cut and paste or you can export to text and import.

    Decompile:

    "c:\Program Files\Microsoft office\office\msaccess.exe" /decompile "c:\My Documents\MyDatabase.mdb"
    

    — http://allenbrowne.com/ser-47.html

    Save As Text:

    Application.SaveAsText acForm, "FormName", "z:\docs\tmp.txt"
    Application.LoadFromText acForm, "restoredForm", "z:\docs\tmp.txt"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
Basically, what I'm trying to create is a page of div tags, each has
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
This could be a duplicate question, but I have no idea what search terms
I know there's a lot of other questions out there that deal with this
I am trying to understand how to use SyndicationItem to display feed which is

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.