473,770 Members | 2,113 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 20988
lo*****@interne t.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.defaul tvalue = theValue.value

If theValue is text, do this:

theValue.defaul tvalue = "'" & 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.*********@he uvelqop.nl> wrote:
lo*****@intern et.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.defaul tvalue = theValue.value

If theValue is text, do this:

theValue.defaul tvalue = "'" & 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*****@intern et.com> wrote:
On Mon, 06 Dec 2004 08:11:42 +0100, Bas Cost Budde
<b.*********@h euvelqop.nl> wrote:
lo*****@inter net.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.defaul tvalue = theValue.value

If theValue is text, do this:

theValue.defaul tvalue = "'" & 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.defaul tvalue = "#" & theValue.value & "#"

Nov 13 '05 #5

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

Similar topics

4
12842
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 possible to do this based on criteria from the previous record?
1
4710
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) BAL (balance of work outstanding at the end of that date) The field REC_COUNT is used as a sort order field so that there is no confusion about which record is next.
3
14554
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 clicks on a row and a main form (pop up) opens bound to a table with a continuous subform bound to another table. On the main form is a field called . It is vital that this is
3
1559
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 = Field3 In the next record i want Field3 to have the default value of the previous Field3.
8
12106
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 combobox. What is the solution? Thank you in advance.
2
4004
by: MLH | last post by:
Fields in MyTable: PostID PostDate RollQtyXfer RollDenomination RollCount37 RollCount23
8
3194
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. I have tried a few ways but the main problem is that after typing a value and hitting Enter it still grabs the value from the previous record, trashing the value they just typed. Any ideas from you lateral thinkers.
1
4341
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 logic for a date field. i.e. theValue.defaultvalue = "#" & theValue.value & "#" I can't get this to work for some reason and I can't figure out why. Can anyone out there help? Thanks Repeat value of previous record field into current...
0
9454
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10260
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10101
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9906
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8933
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6712
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2850
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.