Connecting Tech Pros Worldwide Forums | Help | Site Map

Repeat value of previous record field into current corresponging field

Guest
 
Posts: n/a
#1: Nov 13 '05
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



Bas Cost Budde
Guest
 
Posts: n/a
#2: Nov 13 '05

re: Repeat value of previous record field into current corresponging field


lorendi@internet.com wrote:[color=blue]
> 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.[/color]

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
Guest
 
Posts: n/a
#3: Nov 13 '05

re: Repeat value of previous record field into current corresponging field


On Mon, 06 Dec 2004 08:11:42 +0100, Bas Cost Budde
<b.costbudde@heuvelqop.nl> wrote:
[color=blue]
>lorendi@internet.com wrote:[color=green]
>> 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.[/color]
>
>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 & "'"[/color]

Ah yes, that did it!

Thank You very much.

LB
Guest
 
Posts: n/a
#4: Nov 13 '05

re: Repeat value of previous record field into current corresponging field


On Mon, 06 Dec 2004 16:36:24 -0600, <lorendi@internet.com> wrote:
[color=blue]
>On Mon, 06 Dec 2004 08:11:42 +0100, Bas Cost Budde
><b.costbudde@heuvelqop.nl> wrote:
>[color=green]
>>lorendi@internet.com wrote:[color=darkred]
>>> 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.[/color]
>>
>>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 & "'"[/color]
>
>Ah yes, that did it!
>
>Thank You very much.
>
>LB[/color]

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.
jv
Guest
 
Posts: n/a
#5: Nov 13 '05

re: Repeat value of previous record field into current corresponging field


same concept, except with # signs
theValue.defaultvalue = "#" & theValue.value & "#"

Closed Thread