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 March 1st, 2012, 09:27 AM
Registered User
 
Join Date: Mar 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Carrry over form values.

I am a VBA UberNewb, and need help. I need to revise an entry form to carry over 2 text box values from the previous record. One is an ID number, and the other is the date associated with that ID number. I want the Add Record button to open a new record with these fields pre-populated. Here is the code associated with AddRecord click:
************************************
Private Sub cmdAdd_Click()
On Error GoTo Err_cmdAdd_Click


DoCmd.GoToRecord , , acNewRec

Exit_cmdAdd_Click:
Exit Sub

Err_cmdAdd_Click:
MsgBox Err.Description
Resume Exit_cmdAdd_Click

End Sub
*********************************************
Do I need to add code here? Please be explicit in reply. In three days of web-digging I have not found a simple solution that I can understand.





Similar Threads
Thread Thread Starter Forum Replies Last Post
get the values of form field values crmpicco Perl 2 March 16th, 2007 10:57 AM
Compare "before and after" values on a form? wayne62682 Classic ASP Basics 3 May 17th, 2006 03:13 AM
Truncated Form Values. conscience Pro PHP 1 December 27th, 2004 02:53 PM
Passing values to a form mschenk Access VBA 4 November 30th, 2003 11:39 PM
Passing Values from a Form to another Louisa Beginning VB 6 1 September 2nd, 2003 07:56 AM





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