Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy certain fields from one row of continuous form to another

Status
Not open for further replies.

ojasg

Technical User
Mar 19, 2010
30
DE
I am using a continuous form. It has 10 fields in total, out of which certain are going to be common for all, depending on the situation. I was wondering if I can auto populate these common fields, each time a new row pops up on the continuous form.
I would like to know if there is a VBA code to accomplish this, or a setting in access that I can use. Any help would be greatly appreciated.
Thank You!
 
how about default values in your table or on your form
 
I am sorry, I was not specific; the values are entered by the user in the first row and then they are same for the rest of the rows.
So I can't use defaults. They are user inputted values, which are common during each seperate instance of the form being used.
 
then in the after update

Code:
Me.fieldname.DefaultValue = Me.fieldname.Value
 
How are ya ojasg . . .

I agree with [blue]PWise[/blue] in that it will be [blue]default values[/blue] in the end that will change ... on your variations of course. So what are these variations/factors which determine the values that get updated?

[blue]Your Thoughts? . . .[/blue]

See Ya! . . . . . .

Be sure to see faq219-2884 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
This is a database for creating and storing Tooling Work Orders.
Another form creates a tooling work order. A button on that form directs a user to this continuous form.
The tooling work order number is passed as an OpenArgs. This number remains same for all subsequent entries related to the work order, but chnages with each new one (So I can't use default for this)
Other fields are
1. Location
2. Repair No
3. Team Member
4. Item No
5. Description
6. Tech Initials

Tooling Work Order No, Repair No, and Team Member reamin same.
Location can remain same for a few items, but changes after a few items.
Item No is incremental by 1
Description is unique each time
Tech Initials are not filled out at this time.

So ideally, I would like the form to open with the Tooling Work Order No passed down from OpenArgs. Then as each new row of fields is created by the continuous form, I would like these rows to copy certian fields from the first row or the row above it after the user has made these entries.

I am just struggling to figure out how to reference the new instances of rows that are created on the continuos form.
I hope this helps you guys understand my sitaution better.

Thank You!
 
ojasg . . .

I was thinking of [blue]dynamically changing defaults[/blue] via code that determines what & when to change. You could also try an unbound row of textboxes in the header or footer for input ... add a save button and simply copy the unbound input line to the new record line. The code would then save the record. The user could simply keep editing as necessary per record.

You'll find good use of an unbound input line here thread702-1309854. The code can be modified for your use.

[blue]Your Thoughts? . . .[/blue]

See Ya! . . . . . .

Be sure to see faq219-2884 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
AceMan1,

That sounds like something which will work. I am travelling for work for next two days and won't get time to try it out till next week. But I will keep you posted on the progress I make.

Once again thanks to you and PWise for your inputs.. they are greatly appreciated.

 
I just used a child form to be displayed as datasheet, and some code to store values to be copied over in a temp variable, and copy those to the new field.
It works. I still want to try and learn more about continuous forms, but for now I can do without them.

Thank a lot guys for your inputs and suggestions..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top