Solved

Access 2007 goto specific record while in the form

Posted on 2010-09-13
4
623 Views
Last Modified: 2012-05-10
Howdy all,

Silly one:  I have a form onto of a table and I want to be able to use a "go to" to jump to a specific record. number.

The form is called "frm log" and the record I want to use is the unique log number "ID", I have created a field on the form to add the record number I want to jump too and a button, but dont seem to be able to get the VB behind the button to work.

All help greatfuly received.
0
Comment
Question by:Smartin
4 Comments
 
LVL 19

Expert Comment

by:MINDSUPERB
ID: 33661062
Smartin,

In the Click Event of your button, you may try and copy the code below:

Me.Filter = "[ID]=" & Nz(Me.[txtField],0) & ""
Me..FilterOn = True

Sincerely,

Ed

0
 

Accepted Solution

by:
Smartin earned 0 total points
ID: 33661121
Amazing - spot on!!!

Many thanks...
0
 
LVL 6

Expert Comment

by:JVWC
ID: 33661134
If you use the wizard to add a combobox and select the option to create one that finds a record in your form, then add the fields you want, should do it.

Cheers
JC
0
 
LVL 9

Expert Comment

by:borki
ID: 33661150
If you don't want to use a filter check out this solution:

 Dim rs As DAO.RecordSet

    Set rs = Me.Recordset.Clone
    rs.FindFirst "[ID] = '" & Nz(Me.[txtField],0) & "'"
    Me.Bookmark = rs.Bookmark
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question