Wrox Programmer Forums
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To 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 October 28th, 2004, 07:59 AM
Authorized User
 
Join Date: Oct 2004
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default DoCmd.GoToRecord Error

When I give the code line DoCmd.GotoTorecord , ,acFirst, I get the error message :
Run-time error 2499: You cant use the GotoRecord action or method on an object in Design view.
I am pasting the whole vba code block here

DoCmd.GoToRecord , , acFirst
DoCmd.GoToRecord , , acNewRec


[Forms]![DietMain]![DietSubform].[Form]![Item] = rst![Item]
[Forms]![DietMain]![DietSubform].[Form]![SN] = rst![SN]
rst.MoveNext
DoCmd.GoToRecord , , acNext
Loop Until rst.EOF
rst.MoveNext
rst.Close 'close recordset.

End Sub







Similar Threads
Thread Thread Starter Forum Replies Last Post
DoCmd.GoToRecord , , acNewRec doesnt create new re david_bridges Access VBA 1 August 21st, 2006 06:03 AM
DoCmd.GoToRecord Error in Access VBA myth12345 Access VBA 4 February 16th, 2006 01:58 AM
GoToRecord Error using VBA tied to Command Button pkaptein1 Access 5 May 28th, 2005 09:49 AM
DoCmd.GoToRecord Error in Access VBA myth12345 Access VBA 1 October 30th, 2004 07:29 AM
DoCmd.GoToRecord Error in Access VBA myth12345 Access VBA 1 October 28th, 2004 10:27 AM





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