Set Default text in a textbox to whats in the prev
|
Access VBADiscuss 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
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.
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.