473,396 Members | 1,683 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Repeat value of previous record field into current corresponging field

Something really common I'm sure and I'm surprised it's not just a field
property option.

The previous record's field value can be retrieved and copied into the
current corresponding field by the operator hitting CTRL+APOSTROPHE on the
new field but I would like this to occur with the user having to strike any
keys.

Suggestions?

Thanks,

Loren
Nov 13 '05 #1
4 20949
lo*****@internet.com wrote:
Something really common I'm sure and I'm surprised it's not just a field
property option.

The previous record's field value can be retrieved and copied into the
current corresponding field by the operator hitting CTRL+APOSTROPHE on the
new field but I would like this to occur with the user having to strike any
keys.


It *is* a field property.

In the AfterUpdate event of the control (let's say it is called
theValue), put

theValue.defaultvalue = theValue.value

If theValue is text, do this:

theValue.defaultvalue = "'" & theValue.value & "'"

--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html
I prefer human mail above automated so in my address
replace the queue with a tea
Nov 13 '05 #2
On Mon, 06 Dec 2004 08:11:42 +0100, Bas Cost Budde
<b.*********@heuvelqop.nl> wrote:
lo*****@internet.com wrote:
Something really common I'm sure and I'm surprised it's not just a field
property option.

The previous record's field value can be retrieved and copied into the
current corresponding field by the operator hitting CTRL+APOSTROPHE onthe
new field but I would like this to occur with the user having to strike any
keys.


It *is* a field property.

In the AfterUpdate event of the control (let's say it is called
theValue), put

theValue.defaultvalue = theValue.value

If theValue is text, do this:

theValue.defaultvalue = "'" & theValue.value & "'"


Ah yes, that did it!

Thank You very much.

LB
Nov 13 '05 #3
On Mon, 06 Dec 2004 16:36:24 -0600, <lo*****@internet.com> wrote:
On Mon, 06 Dec 2004 08:11:42 +0100, Bas Cost Budde
<b.*********@heuvelqop.nl> wrote:
lo*****@internet.com wrote:
Something really common I'm sure and I'm surprised it's not just a field
property option.

The previous record's field value can be retrieved and copied into the
current corresponding field by the operator hitting CTRL+APOSTROPHE on the
new field but I would like this to occur with the user having to strike any
keys.


It *is* a field property.

In the AfterUpdate event of the control (let's say it is called
theValue), put

theValue.defaultvalue = theValue.value

If theValue is text, do this:

theValue.defaultvalue = "'" & theValue.value & "'"


Ah yes, that did it!

Thank You very much.

LB


The above event/code worked fine for a text type control but not for a date
type. Can someone please tell me what to use to propagate a date field?

Thanks.
Nov 13 '05 #4
jv
same concept, except with # signs
theValue.defaultvalue = "#" & theValue.value & "#"

Nov 13 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Gene | last post by:
When entering a record in a form, I would like a value in a field of the previous record to be entered automatically into a different field of the current record. Which way should I go? Is it also...
1
by: AAVF | last post by:
I have a small table that need to keep a balance of work outstanding. The fields are as follows REC_COUNT (auto-index created record counter) DATE (work date) QTY_REQD (work added on that date)...
3
by: William Wisnieski | last post by:
Hello Again, I'm really stuck on this one.....so I'm going to try a different approach to this problem. I have a query by form that returns a record set in a datasheet. The user double...
3
by: Phil | last post by:
Newbie to Access so am having a BIT of difficulty. I am trying to get a field value in a new record to equal the value of the same field of a previous one. For instance, Field1 + Field2 =...
8
by: Zlatko Matić | last post by:
There is a form (single form) and a combobox. I want that current record of the form is adjusted according to selected value in the combobox. Cuurrent record should be the same as the value in the...
2
by: MLH | last post by:
Fields in MyTable: PostID PostDate RollQtyXfer RollDenomination RollCount37 RollCount23
8
by: Jeff | last post by:
A client wants a press of the Enter key in a field on a continuous form to grab the value of that field from the previous record. But if they have typed a value and then hit Enter it shouldn't. ...
1
by: roveagh1 | last post by:
Hi I've been using the 2 year old link below to repeat values from previous record field into current corresponding field. It's worked fine for text but the last piece of advice was to use the same...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.