Carry Field Forward | | |
Hi, I'm sure this has been asked and answered before but I lost it.
How does one code a form to carry forward the only certain fields from
the previous record. Thanks. | | | | re: Carry Field Forward
For each field you want to carry forward, put the following code in the
AfterUpdate event of the field:
Me!NameOfField.DefaultValue = Me!NameOfField
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications resource@pcdatasheet.com www.pcdatasheet.com
"John" <jbim@cogeco.ca> wrote in message
news:sphs9058nh9u2im1bs12ehfb3j26k8ja24@4ax.com...[color=blue]
> Hi, I'm sure this has been asked and answered before but I lost it.
> How does one code a form to carry forward the only certain fields from
> the previous record. Thanks.
>[/color] | | | | re: Carry Field Forward
On Sun, 09 May 2004 15:53:37 GMT, "PC Datasheet" <spam@nospam.spam>
wrote:
[color=blue]
>For each field you want to carry forward, put the following code in the
>AfterUpdate event of the field:
>Me!NameOfField.DefaultValue = Me!NameOfField[/color]
Thanks. | | | | re: Carry Field Forward
On Sun, 09 May 2004 15:53:37 GMT, "PC Datasheet" <spam@nospam.spam>
wrote:
[color=blue]
>For each field you want to carry forward, put the following code in the
>AfterUpdate event of the field:
>Me!NameOfField.DefaultValue = Me!NameOfField[/color]
I'm not that good at explaining what I mean. When I enter a new
record a new date (today) goes in the DateField, now when I tab to the
description_field I want get the description from the previous record.
Does this make sense. Thanks again. | | | | re: Carry Field Forward
Do you have any other fields in the record?
"John" <jbim@cogeco.ca> wrote in message
news:c3os90hu36boa7245ftl4vrqmvpkd68b8p@4ax.com...[color=blue]
> On Sun, 09 May 2004 15:53:37 GMT, "PC Datasheet" <spam@nospam.spam>
> wrote:
>[color=green]
> >For each field you want to carry forward, put the following code in the
> >AfterUpdate event of the field:
> >Me!NameOfField.DefaultValue = Me!NameOfField[/color]
>
> I'm not that good at explaining what I mean. When I enter a new
> record a new date (today) goes in the DateField, now when I tab to the
> description_field I want get the description from the previous record.
> Does this make sense. Thanks again.
>
>[/color] | | | | re: Carry Field Forward
Yes, I have the Date field,Description Field and Distance Field.
On Sun, 09 May 2004 18:17:24 GMT, "PC Datasheet" <spam@nospam.spam>
wrote:
[color=blue]
>Do you have any other fields in the record?
>
>
>"John" <jbim@cogeco.ca> wrote in message
>news:c3os90hu36boa7245ftl4vrqmvpkd68b8p@4ax.com.. .[color=green]
>> On Sun, 09 May 2004 15:53:37 GMT, "PC Datasheet" <spam@nospam.spam>
>> wrote:
>>[color=darkred]
>> >For each field you want to carry forward, put the following code in the
>> >AfterUpdate event of the field:
>> >Me!NameOfField.DefaultValue = Me!NameOfField[/color]
>>
>> I'm not that good at explaining what I mean. When I enter a new
>> record a new date (today) goes in the DateField, now when I tab to the
>> description_field I want get the description from the previous record.
>> Does this make sense. Thanks again.
>>
>>[/color]
>[/color] | | | | re: Carry Field Forward
Put the following code in the form's OnCurrent event:
If IsNull(Me!Description.DefaultValue) Then
Me!Description.SetFocus
Else
Me!Distance.SetFocus
End If
Put the following code in the Description Field's AfterUpdate Event:
Me!Description.DefaultValue = Me!Description
Put the following code in the Distance Field's AfterUpdate Event:
Me!NameOfDateField = Date()
Me!Description.DefaultValue = Me!Description
Set the tab stop for the Date field to No, and the tab order to Description -
Distance.
When you go to a new record, if the Description field does not have a default
value, you will go to the Description field and enter the description. If it
does have a default value, you will go to the Distanct field and enter the
distance. The Date field and Description field will automatically be filled in
when you press enter, go to another record, go to a new record or close the
form.
Steve
PC Datasheet
put the following code in the AfterUpdate event of the field:[color=blue][color=green][color=darkred]
>> >Me!NameOfField.DefaultValue = Me!NameOfField[/color][/color][/color]
"John" <jbim@cogeco.ca> wrote in message
news:g50t90t82p5c58g4fhrc06s3e2tgp5mk06@4ax.com...[color=blue]
> Yes, I have the Date field,Description Field and Distance Field.
>
>
> On Sun, 09 May 2004 18:17:24 GMT, "PC Datasheet" <spam@nospam.spam>
> wrote:
>[color=green]
> >Do you have any other fields in the record?
> >
> >
> >"John" <jbim@cogeco.ca> wrote in message
> >news:c3os90hu36boa7245ftl4vrqmvpkd68b8p@4ax.com.. .[color=darkred]
> >> On Sun, 09 May 2004 15:53:37 GMT, "PC Datasheet" <spam@nospam.spam>
> >> wrote:
> >>
> >> >For each field you want to carry forward, put the following code in the
> >> >AfterUpdate event of the field:
> >> >Me!NameOfField.DefaultValue = Me!NameOfField
> >>
> >> I'm not that good at explaining what I mean. When I enter a new
> >> record a new date (today) goes in the DateField, now when I tab to the
> >> description_field I want get the description from the previous record.
> >> Does this make sense. Thanks again.
> >>
> >>[/color]
> >[/color]
>[/color] | | | | re: Carry Field Forward
Thanks a lot, I will give it a shot tomorrw. Thanks again
On Sun, 09 May 2004 20:09:49 GMT, "PC Datasheet" <spam@nospam.spam>
wrote:
[color=blue]
>Put the following code in the form's OnCurrent event:
>
>If IsNull(Me!Description.DefaultValue) Then
> Me!Description.SetFocus
>Else
> Me!Distance.SetFocus
>End If
>
>Put the following code in the Description Field's AfterUpdate Event:
>Me!Description.DefaultValue = Me!Description
>
>Put the following code in the Distance Field's AfterUpdate Event:
>Me!NameOfDateField = Date()
>Me!Description.DefaultValue = Me!Description
>
>Set the tab stop for the Date field to No, and the tab order to Description -
>Distance.
>
>When you go to a new record, if the Description field does not have a default
>value, you will go to the Description field and enter the description. If it
>does have a default value, you will go to the Distanct field and enter the
>distance. The Date field and Description field will automatically be filled in
>when you press enter, go to another record, go to a new record or close the
>form.
>
>Steve
>PC Datasheet
>
>put the following code in the AfterUpdate event of the field:[color=green][color=darkred]
>>> >Me!NameOfField.DefaultValue = Me!NameOfField[/color][/color]
>"John" <jbim@cogeco.ca> wrote in message
>news:g50t90t82p5c58g4fhrc06s3e2tgp5mk06@4ax.com.. .[color=green]
>> Yes, I have the Date field,Description Field and Distance Field.
>>
>>
>> On Sun, 09 May 2004 18:17:24 GMT, "PC Datasheet" <spam@nospam.spam>
>> wrote:
>>[color=darkred]
>> >Do you have any other fields in the record?
>> >
>> >
>> >"John" <jbim@cogeco.ca> wrote in message
>> >news:c3os90hu36boa7245ftl4vrqmvpkd68b8p@4ax.com.. .
>> >> On Sun, 09 May 2004 15:53:37 GMT, "PC Datasheet" <spam@nospam.spam>
>> >> wrote:
>> >>
>> >> >For each field you want to carry forward, put the following code in the
>> >> >AfterUpdate event of the field:
>> >> >Me!NameOfField.DefaultValue = Me!NameOfField
>> >>
>> >> I'm not that good at explaining what I mean. When I enter a new
>> >> record a new date (today) goes in the DateField, now when I tab to the
>> >> description_field I want get the description from the previous record.
>> >> Does this make sense. Thanks again.
>> >>
>> >>
>> >[/color]
>>[/color]
>[/color] |  | Similar Microsoft Access / VBA bytes | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 226,419 network members.
|