473,725 Members | 1,869 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

4Him
3 New Member
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 9807
Rabbit
12,516 Recognized Expert Moderator MVP
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 New Member
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 New Member
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 Recognized Expert Moderator MVP
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
4095
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
8363
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 recordsource is also based on a table (TblB). SubFrmC's recordsource is also based on a table (TblC). There is a one-to-many relationship between TblA (one) and TblB (many).
1
2565
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. I want to add the functionality to copy records from subformA to subformB WITHOUT USING COPY/PASTE. The reasonfor this is that I must
19
3477
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
2150
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 collected in tblHeader is simple: HeaderID (unique), a text description field, and a date field. I need to be able to copy header and it's related info. I have a form with a "Copy Source" combo box allowing the user to select a Header...
5
13990
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 button "copy" and "paste". Works like magic. My problem is how can I copy multiple records and paste them at the same time. My data entry form has main form that has a Questionlist box of Questions. The second list box on the same form displays...
3
4417
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 the basis of two dates like that. Data in continous form table1 ----------------------------- Data entered in continous form 10/09/2006 10/12/2006 John
7
8695
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 this form is a query that I built that is based on a table. I have been working on this for several weeks and now I have been told that many times when a user wants to create a new record, much of the information that is displayed in a...
5
11143
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 the main form. I have two buttons in the sub form one for selecting and copying all the records and another for pasting the records this enables me to copy and paste the equipment resources from one scheduled meeting to another. The buttons are...
0
8747
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9392
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9162
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6694
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5997
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4505
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4773
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3211
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2619
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.