Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
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 September 16th, 2005, 10:35 AM
Authorized User
 
Join Date: Jan 2005
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts
Default Set Default text in a textbox to whats in the prev

I have a contiuous form that works on a table. Basically its used to fill the table. I want to make it so that when a new record is made in the table the default text in it is what was in the previous record. Not sure if it is possible but I hope it is. This would save my people who enter data a hell of a lot of time when things are reptetive.

THanks, Marcin

 
Old September 19th, 2005, 08:55 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

In the textbox's recordsource type:
 =DLookUp("[Field]","Table","[ID]=Forms![Form1]![ID]-1")
where Field is the field where the value is stored, Table is the table name, ID is your PK field, and Form1 is your form name.

HTH


mmcdonal





Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i set default parameter value.. rupen Classic ASP Basics 5 January 5th, 2007 12:14 AM
How to select text by default in a text box? clickajin Java GUI 0 August 3rd, 2006 03:10 AM
How to set textbox property to readonly when text bekim Classic ASP Basics 1 July 12th, 2005 12:06 AM
how to set parameter default value oranginalab Classic ASP Basics 0 August 28th, 2003 02:53 AM





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