Solved

Access 2007 goto specific record while in the form

Posted on 2010-09-13
4
621 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

759 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now