By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,600 Members | 1,108 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,600 IT Pros & Developers. It's quick & easy.

Copy/paste multiple fields into multiple records; in a form

4Him
P: 3
First off, let me say this is a great site! I've just started working with Access and much of my success is from what I've read here!

Background: I have a form, driven off a single table.
Goal: To have multiple fields copied and pasted into multiple records with a single button click.
Work Done: In the form I have multiple fields, but for my question let's just refer to FIELD 1 and FIELD 2. I would like to copy the value of FIELD 2 and paste it into FIELD 1; for all the records. I created a button with an On Click Command of...

Expand|Select|Wrap|Line Numbers
  1. Me![FIELD 1] = Me![FIELD 2]
This works fine for one record at a time. But I would like to know if there is a way to do it so all the records are updated from the single button click?

My thanks in advance!
Jun 5 '07 #1
Share this Question
Share on Google+
4 Replies


Rabbit
Expert Mod 10K+
P: 12,365
First off, let me say this is a great site! I've just started working with Access and much of my success is from what I've read here!

Background: I have a form, driven off a single table.
Goal: To have multiple fields copied and pasted into multiple records with a single button click.
Work Done: In the form I have multiple fields, but for my question let's just refer to FIELD 1 and FIELD 2. I would like to copy the value of FIELD 2 and paste it into FIELD 1; for all the records. I created a button with an On Click Command of...

Expand|Select|Wrap|Line Numbers
  1. Me![FIELD 1] = Me![FIELD 2]
This works fine for one record at a time. But I would like to know if there is a way to do it so all the records are updated from the single button click?

My thanks in advance!
What about having the button run an update query instead?
Jun 5 '07 #2

4Him
P: 3
What about having the button run an update query instead?

I've tried that also, but I'm probably doing it wrong. Everything I've seen on an update query shows examples of how to change the value of a field to another text string (ie: update FIELD 1 to now show "newfield" for all records) or to change the value of the field based off a mathematical formula (ie: update FIELD 1 to now show FIELD 1 *0.13). In the update query I've tried to have my Update To showing
Expand|Select|Wrap|Line Numbers
  1. [Tablename].[Newfieldname]
, but nothing happens.

Any enlightenment would be appreciated!
Jun 6 '07 #3

4Him
P: 3
I tried the update query again and this time it worked! I figured out what I was doing wrong the first time. When I tried to do the update query before I would click the OPEN button on the query menu and when the datasheet appeared, nothing had changed. That's when I changed course.

This time I tried the update query, saved it, closed it and then ran it. Now it did exactly what I thought it was suppose to...update the fields in the table with alternative data from different fields.

Thank you for pointing me back in that direction!
I love this forum!
Jun 6 '07 #4

Rabbit
Expert Mod 10K+
P: 12,365
I tried the update query again and this time it worked! I figured out what I was doing wrong the first time. When I tried to do the update query before I would click the OPEN button on the query menu and when the datasheet appeared, nothing had changed. That's when I changed course.

This time I tried the update query, saved it, closed it and then ran it. Now it did exactly what I thought it was suppose to...update the fields in the table with alternative data from different fields.

Thank you for pointing me back in that direction!
I love this forum!
Not a problem, Good luck.
Jun 6 '07 #5

Post your reply

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