473,402 Members | 2,050 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,402 software developers and data experts.

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

4Him
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
4 9768
Rabbit
12,516 Expert Mod 8TB
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
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
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
12,516 Expert Mod 8TB
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

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

Similar topics

7
by: Drew | last post by:
I have a db table like the following, UID, int auto-increment RegNo Person Relation YearsKnown Now here is some sample data from this table,
3
by: Tlm | last post by:
Hello All, I have a form (FrmA) with a subform (SubFrmB) embedded in it. SubFrmB also has a subform embedded in it (SubFrmC) The form's recordsource is based on a table (TblA). SubFrmB's...
1
by: Sean Howard | last post by:
Dear All, As is my want I need to do something in Access that seems simple but cannot fathom out. I have main form with two subforms, both datasheets with an almost identical table structure....
19
by: davidgordon | last post by:
Hi, I need some pointers/help on how to do the following if it possible: In my access db, I have the following: Tables: Products, Sub-Assembly, Product-Pack Table, Products
0
by: igendreau | last post by:
I have a database with a Header table. Each record in tblHeader has two One-to-Many Relationships: with tblLines and tblKeys. The HeaderID field ties tblHeader to the other two tables. The data...
5
by: Kaur | last post by:
Hi, I have been successful copying a vba code from one of your posts on how to copy and paste a record by declaring the desired fields that needs to be copied in form's declaration and creating two...
3
by: colleen1980 | last post by:
Hi: Can any one please help me when user select 2 dates from DDLDate1 10/09/2006 and DDLDate2 10/12/06 and the name and it close the form. I need to create multiple records in the another table on...
7
kcdoell
by: kcdoell | last post by:
Good morning everyone: I created a form and set the default view as a continuous form. Basically the form is displaying records in which the user can add or edit new ones. The record source for...
5
by: phill86 | last post by:
Hi I have a main form that holds records for scheduled meetings, date time location etc... in that form i have a sub form that has a list of equipment resources that you can assign to the meeting in...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.