473,414 Members | 1,667 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,414 software developers and data experts.

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.

Nov 12 '05 #1
7 2199
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
re******@pcdatasheet.com
www.pcdatasheet.com
"John" <jb**@cogeco.ca> wrote in message
news:sp********************************@4ax.com...
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.

Nov 12 '05 #2
On Sun, 09 May 2004 15:53:37 GMT, "PC Datasheet" <sp**@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


Thanks.

Nov 12 '05 #3
On Sun, 09 May 2004 15:53:37 GMT, "PC Datasheet" <sp**@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.
Nov 12 '05 #4
Do you have any other fields in the record?
"John" <jb**@cogeco.ca> wrote in message
news:c3********************************@4ax.com...
On Sun, 09 May 2004 15:53:37 GMT, "PC Datasheet" <sp**@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.

Nov 12 '05 #5
Yes, I have the Date field,Description Field and Distance Field.
On Sun, 09 May 2004 18:17:24 GMT, "PC Datasheet" <sp**@nospam.spam>
wrote:
Do you have any other fields in the record?
"John" <jb**@cogeco.ca> wrote in message
news:c3********************************@4ax.com.. .
On Sun, 09 May 2004 15:53:37 GMT, "PC Datasheet" <sp**@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.


Nov 12 '05 #6
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:
>Me!NameOfField.DefaultValue = Me!NameOfField
"John" <jb**@cogeco.ca> wrote in message
news:g5********************************@4ax.com... Yes, I have the Date field,Description Field and Distance Field.
On Sun, 09 May 2004 18:17:24 GMT, "PC Datasheet" <sp**@nospam.spam>
wrote:
Do you have any other fields in the record?
"John" <jb**@cogeco.ca> wrote in message
news:c3********************************@4ax.com.. .
On Sun, 09 May 2004 15:53:37 GMT, "PC Datasheet" <sp**@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.

Nov 12 '05 #7
Thanks a lot, I will give it a shot tomorrw. Thanks again
On Sun, 09 May 2004 20:09:49 GMT, "PC Datasheet" <sp**@nospam.spam>
wrote:
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:
>Me!NameOfField.DefaultValue = Me!NameOfField

"John" <jb**@cogeco.ca> wrote in message
news:g5********************************@4ax.com.. .
Yes, I have the Date field,Description Field and Distance Field.
On Sun, 09 May 2004 18:17:24 GMT, "PC Datasheet" <sp**@nospam.spam>
wrote:
>Do you have any other fields in the record?
>
>
>"John" <jb**@cogeco.ca> wrote in message
>news:c3********************************@4ax.com.. .
>> On Sun, 09 May 2004 15:53:37 GMT, "PC Datasheet" <sp**@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.
>>
>>
>


Nov 12 '05 #8

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

Similar topics

3
by: NotGiven | last post by:
I need to send emails to about 100 people for a client - NOT spam. Rather it is a notifying them of a page they need to view. majorDomo - look stoo complicated to get up and running and I don't...
0
by: Bryan Parkoff | last post by:
I break one U_WORD variable into two U_BYTE variables. I prefer to manipulate two U_BYTE variables instead of one U_WORD variable using Carry. Please look at my example using U_WORD variable...
2
by: Almir | last post by:
I have a simple problem, i just can get a grasp on it. I designed a database for inventory of computer equipment. Now i created forms for each table. Each piece of equipment is going to come in an...
2
by: Paul Malcomson | last post by:
Hi. I'm having terrible trouble with a form that displays several parent/child relationships at one time. It is a sales force hierarchy - Sales force, district, territory, sales rep are the...
5
by: campbellbrian2001 | last post by:
I'm trying to get the "Carry data over to new record" code to work from Allen Browne's site: http://allenbrowne.com/ser-24.html I follwed the instruction explicitly and somethings not working......
3
chunk1978
by: chunk1978 | last post by:
hi there... i'm trying to make one text field contain the value of another... i'm assuming there's a really simple solution... here's a code i quickly wrote to further explain my issue: ...
0
by: =?Utf-8?B?UmF5IE1pdGNoZWxs?= | last post by:
Hello, I have a DateTimePicker set to the custom format HH:mm:ss. (I used the custom format to avoid the AM/PM part, even though my OS is set up for the 12-hour time format.) It works fine...
1
by: lilihope824 via AccessMonster.com | last post by:
I am building an inventory control database. But I want to create a inventory reconcilation.I will want to have the database be able me to check StockOnHand at anytime during the month by :...
4
by: sass | last post by:
Hi! this must be a stupid question, but bare with me - I just started learning html! My problem: I have several html pages that use forms to collect user input. On each page, submitting the...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
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,...
0
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...

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.