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

how do you get data fields to carry over to a new record?

Is there a simple way, without setting up a module, to get certain data fields to carry over to a new record as well in MS Access 2003. I've tried alot of modifications to the "default value" but none of them seem to work.

If anyone can help me out it would be greatly appreciated.
Jun 5 '07 #1
13 11572
ADezii
8,834 Expert 8TB
Is there a simple way, without setting up a module, to get certain data fields to carry over to a new record as well in MS Access 2003. I've tried alot of modifications to the "default value" but none of them seem to work.

If anyone can help me out it would be greatly appreciated.
  1. Do you want ALL Fields carried over to the New Record or selective ones?
  2. Do you want these values automatically transferred over to the New Record, or when you enter these Fields?
  3. Once data is entered into a Field, does it become the new default Value for that Field?
Jun 5 '07 #2
Rabbit
12,516 Expert Mod 8TB
Is there a simple way, without setting up a module, to get certain data fields to carry over to a new record as well in MS Access 2003. I've tried alot of modifications to the "default value" but none of them seem to work.

If anyone can help me out it would be greatly appreciated.
Does this table have a unique field that increments for each record added?
If it does then you can use a DMax embedded in a DLookup.
Jun 5 '07 #3
  1. Do you want ALL Fields carried over to the New Record or selective ones?
  2. Do you want these values automatically transferred over to the New Record, or when you enter these Fields?
  3. Once data is entered into a Field, does it become the new default Value for that Field?
Sorry for being unclear before:

I only need selective fields to be carried over, not all.

I'm actually using a form so, when the user decides to insert a new record, I want certain fields from the previous record to carry over.

Yes, once the values in the selective fields are modified on the form, i want those value to become the new default values.
Jun 5 '07 #4
Does this table have a unique field that increments for each record added?
If it does then you can use a DMax embedded in a DLookup.
No, unfortunately the records do not have any fields like that.
Jun 5 '07 #5
Rabbit
12,516 Expert Mod 8TB
You'll probably have to add one then, unless ADezii has another idea.
Jun 5 '07 #6
Ok i've found that solution for those of you with a similar problem, google "previous record" instead of "carry over", it works alot better, anyways, i found the solution in another forum there.

http://www.thescripts.com/forum/thread203454.html

incase it doesnt work here is the main thing you need:

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 & "'"
http://www.thescripts.com/forum/thread203454.html
Jun 5 '07 #7
Rabbit
12,516 Expert Mod 8TB
Ok i've found that solution for those of you with a similar problem, google "previous record" instead of "carry over", it works alot better, anyways, i found the solution in another forum there.

http://www.thescripts.com/forum/thread203454.html

incase it doesnt work here is the main thing you need:



http://www.thescripts.com/forum/thread203454.html
This solution uses a code module which is what you wanted to avoid in the first place.
Jun 5 '07 #8
ADezii
8,834 Expert 8TB
Sorry for being unclear before:

I only need selective fields to be carried over, not all.

I'm actually using a form so, when the user decides to insert a new record, I want certain fields from the previous record to carry over.

Yes, once the values in the selective fields are modified on the form, i want those value to become the new default values.
Only a couple of lines of Code will do the trick for you.
  1. For each Control that you wish to carry over its value, set the Control's Tag Property to Carry.
  2. Place this code in the AfterUpdate() Event of the Form.
  3. For each Control that you elected to carry over, set its Tag Property to Carry, its Default Value will be reset and will subsequently appear in New Record mode.
  4. Let me know how you make out with this.
Expand|Select|Wrap|Line Numbers
  1. Dim ctl As Control
  2.  
  3. For Each ctl In Me.Controls
  4.   If ctl.Tag = "Carry" Then
  5.     ctl.DefaultValue = "'" & ctl.Value & "'"
  6.   End If
  7. Next
Jun 5 '07 #9
ADezii
8,834 Expert 8TB
Ok i've found that solution for those of you with a similar problem, google "previous record" instead of "carry over", it works alot better, anyways, i found the solution in another forum there.

http://www.thescripts.com/forum/thread203454.html

incase it doesnt work here is the main thing you need:



http://www.thescripts.com/forum/thread203454.html
Be advised that this approach does not take into consideration the carrying over of values for 'selective' Controls, see my response in Message #9.
Jun 5 '07 #10
FishVal
2,653 Expert 2GB
Be advised that this approach does not take into consideration the carrying over of values for 'selective' Controls, see my response in Message #9.
Why?

This is an Expression handler of AfterUpdate event on a particular control.
Thus it is very selective by its nature and it fits the need "not to create module". Personally I prefer coding but I'm really appreciating this simple and elegant solution.

:)
Jun 5 '07 #11
Rabbit
12,516 Expert Mod 8TB
Why?

This is an Expression handler of AfterUpdate event on a particular control.
Thus it is very selective by its nature and it fits the need "not to create module". Personally I prefer coding but I'm really appreciating this simple and elegant solution.

:)
Problem is that their solution doesn't work unless it's in the form's code module.
Jun 5 '07 #12
FishVal
2,653 Expert 2GB
Problem is that their solution doesn't work unless it's in the form's code module.
Big deal. A good village is burning beautifully.
Of course this doesn't work. Long live VBA. :)
Jun 6 '07 #13
Rabbit
12,516 Expert Mod 8TB
Big deal. A good village is burning beautifully.
Of course this doesn't work. Long live VBA. :)
lol, I have no problem with VBA. It's just that the poster originally wanted to avoid VBA.
Jun 6 '07 #14

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: LarryH | last post by:
I am new to Access and have one small problem I can't seem to solve. I have a database with multiple order records for people. Each person has a unique ID, and is on the datbase multiple times,...
0
by: David Lao | last post by:
Hi All, I need a way to extract Data value from the Outlook form when the new mails arrive. The data fields are provided. Thanks. David
13
by: MLH | last post by:
I have a number of reports that are essentially black 'n white prepared forms (picture an IRS form 1040). The data fields are overlaid onto the report fields in the correct positions and I would...
1
by: pconrad | last post by:
I've got a syslog server posting to MS SQL. It works great as far as posting all the data. However, it puts all the useful information into one big text field called message. How can I parse that...
0
by: ASMJ | last post by:
Hi, I have a web page with some data fields contained in the panel and a grid view below it. The data fields are not placed in the position in which they are designed when I run the appln. After a...
1
by: new | last post by:
I have data for each week in a single table. I need to export this data to a separate flat file for each week. Any ideas? DB2 SQL Query export to flat files as a function of data on each record
3
hariharanmca
by: hariharanmca | last post by:
Can any1 explain the Diff Between Data Set and Record Set in detail
0
by: sijugeo | last post by:
Hi, I Have a MS word template field which have certain data fields. I want to populate the data fields using the data retrived from SQL db. How can I do this? Thanks in advance Siju george
0
by: anthony lapenna | last post by:
How do I set default values so the data entries carry over to a new record
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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
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...

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.