Connecting Tech Pros Worldwide Help | Site Map

Carry Field Forward

  #1  
Old November 12th, 2005, 11:39 PM
John
Guest
 
Posts: n/a
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.

  #2  
Old November 12th, 2005, 11:39 PM
PC Datasheet
Guest
 
Posts: n/a

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]


  #3  
Old November 12th, 2005, 11:39 PM
John
Guest
 
Posts: n/a

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.

  #4  
Old November 12th, 2005, 11:39 PM
John
Guest
 
Posts: n/a

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.


  #5  
Old November 12th, 2005, 11:39 PM
PC Datasheet
Guest
 
Posts: n/a

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]


  #6  
Old November 12th, 2005, 11:39 PM
John
Guest
 
Posts: n/a

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]

  #7  
Old November 12th, 2005, 11:39 PM
PC Datasheet
Guest
 
Posts: n/a

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]


  #8  
Old November 12th, 2005, 11:39 PM
John
Guest
 
Posts: n/a

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]

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Please help me design my database Nelson answers 1 April 30th, 2006 01:15 AM
relatively new to database moriman answers 3 November 13th, 2005 04:09 PM
back to basics, adding and editing Table records from a Form, proper procdures RC answers 1 November 13th, 2005 04:47 AM
query by field heading John young answers 13 November 12th, 2005 11:41 PM