Solved

MS Access : Goto record

Posted on 2004-08-09
2
999 Views
Last Modified: 2012-06-21
Hi all,

I am relatively new to Access. My question is pretty basic, so hopefully the aswer will be easy for you guys.

I have a main form to manage my contacts, and a "Search Contacts" form. This searchform works great : I can fill in the search criteria, hit the 'search' button, and it shows all records that fulfill the criteria. Next to every record there is a "Goto" button, that launches the main form with the selected record. I used the
 
    docmd.Openform formname,,,criteria

methode to open the contactsform with the resulting record.

But in this contactsform, there is only one record in the recordset.
Is there a way that when I click on the "Goto" button in the searchform, that the mainform is opened with all records in the recordset, but the bookmark is set correctly so the chosen record is visible.
I allready tried to copy the bookmark from my search-query to the recordset of my main form, but these are incompatible.

Thx
0
Comment
Question by:Thomas_VDB
2 Comments
 
LVL 26

Accepted Solution

by:
dannywareham earned 50 total points
ID: 11751544
If you have a record number in your table (say RecordID), you can fetch the record via:

Me.Recordset.FindFirst "RecordID=" & "YourEntry".Value

In the onload of the form.
0
 

Author Comment

by:Thomas_VDB
ID: 11751870
Thanks a lot !
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

708 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

16 Experts available now in Live!

Get 1:1 Help Now