Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 6th, 2005, 04:35 PM
Registered User
 
Join Date: Aug 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default DoCmd.FindRecord problem

When I use the DoCmd.FindRecord it doesn't find the first record but it can find all the other ones? Why is it skipping the first record?
 
Old August 9th, 2005, 07:58 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

If you're using the DoCmd.FindRecord in a loop, put this before the loop starts:

DoCmd.MoveFirst

or

DoCmd.FindFirst "your criteria here"

The former will move your pointer up to the top first. The latter will do the same and then do the first search of your criteria.

Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division





Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with DoCmd.Printout (Access2003) John Deutsch Access VBA 4 January 22nd, 2008 12:45 PM
Docmd.Openform problem mkobulni Access VBA 7 August 29th, 2007 09:05 AM
DoCmd.FindRecord MoDulus Beginning VB 6 0 March 14th, 2006 11:55 AM
HEEELP!!! - strWhere Problem with DoCmd.OpenReport HenryE Access 1 August 4th, 2004 01:07 AM
docmd.findrecord problem 02153246XX Access VBA 0 October 27th, 2003 01:58 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.