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 July 1st, 2003, 03:53 PM
Authorized User
 
Join Date: Jun 2003
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default copy previous field value

I have an Access project that is based on a SQL Server2k db.
The main thrust of the Access front end is a single data entry form. I would like the user to be able to copy the value in a field using the value entered in that field in the previous record. In an access .mdb this is done using the control-' key combination. But this doesn't work in an access project.
Any suggestions how I can add this functionality? I would even be willing to try a wild workaround because this is an important user requirement.
 
Old August 8th, 2003, 07:21 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 120
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Set up some module level variables - one for each field on the form.

Whenever a record is saved, write the value of the fields to these variables.

Create an AutoKeys macro and set up the <ctrl>- shortcut in it.

Write a function that can be run from this macro. This function will check which control currently has the focus and then copy the data from the correct variable.


Brian Skelton
Braxis Computer Services Ltd.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Previous field /column value in cross-tab mozilago SQL Server ASP 0 March 7th, 2007 02:58 AM
Copy previous field record if next field is null ecampos Access VBA 6 June 23rd, 2006 12:55 PM
Next and Previous buttons. g_vamsi_krish ASP.NET 1.x and 2.0 Application Design 1 January 19th, 2006 11:19 AM
Copy data from a databse field to a folder Sheikha Oracle 1 December 15th, 2005 01:22 PM
Move Next, Previous, First and Last nvillare Classic ASP Basics 1 August 1st, 2003 04:21 PM





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