Topics Search

Macro to copy a record and paste within a table?

Macro to copy a record and paste within a table?
Views: 95
I have a table of part numbers and associated information. When I add a new part number, I'd like to use a macro that copies a specified older part and pastes it with a specified new part number. I can't seem to find a function that does this
Sponsored Links:

Similar posts...


Copy and Multiple Paste

Copy and Multiple Paste Icon
I would like to be able to copy a single record in a table and then paste this record a pre-defined number of times 10,20,30 depending on requirements. The reason I need to do this is that I want to set up a number of identical records that can easily be amended into unique records.

This will vastly reduce the amount of work and time spent entering records individually.

The only way that I have been able to achieve this is to copy and transfer the master record into Excel, and then copy the row and paste it into a range of cells. Copy the range of cellsback from Excel and then paste this range back into the Access table.

Copy record in same table

Copy record in same table Icon
I would like to copy a record and past it in the same table.
I want to use a button on a form to do this, of course you could go into the table and manualy copy and paste the record, but I don't like my users to go into the table.

the table name is PROJECT and I want to copy one record with all of its contents. The primary key is Auto numbering.
The table containts more than 100 columns

Copy and Paste macro

Copy and Paste macro Icon
I need to create a short cut menu in 2007 that will have the copy and paste command. I went to Access help and it showed how to create a shortcut menu using a macro but when I attempted to create this macro I could not find copy or paste in the ACTION column. I also looked in the RunCommand Action arguments and did not find them. I have hidden all the default menus and ribbons but now I need to create a shortcut menu to copy and paste and attach to a form

Copy and Paste Select Fields

Copy and Paste Select Fields Icon
Trying to Copy selected fields from Current Record in Form [ENTRY]. The Table [INSERTS] has a AutoNumber field which appears to prevent copying and pasting the entire record. The preferred method would be to copy select fields
create a NEW record and paste those values into the new record. The new record would then be visible on the form for additional entry.
I can manually copy and paste the entire row from within the table but cannot get it to work any other way. The Duplicate Record function errors.Append Query errors. Working in Access 2010.

Macro to copy linked table to local

Macro to copy linked table to local Icon
i've got a table in my database that is linked to an external source through an ODBC connection.

how do I create a macro to copy this table and paste as a local one.

i've managed to work out how to create a macro to copy the table but it just leaves it as a linked table

Multiple record paste

Multiple record paste Icon
I'm sure this has been asked a hundred times, but I cannot find a good answer. In a table, I am trying to copy paste from one field, one record (cell), into multiple records of that same field or any field I wish. Basically, I would love to highlight any range, whether it is single or multiple records and rows, and paste over where I choose. So if in records 1, 2, and 3, I highlight and copy the values in field A, how do I paste these values in records 4, 5, and 6 of field A, B, etc. I know I'm thinking in Excel mode, but I generally do not manually input my data in Access, but rather dump reports through Monarch

Button to copy fields then a button to paste them into another record.

Button to copy fields then a button to paste them into another record. Icon
But I was merely looking as I was not upto the stage of incorporating it. I am now at that stage,

What do I need to do to be able to copy certain fields in one record via a copy butto and then go to another existing record and by clicking another button, Paste, will fill in the copied fields.

I have different fields like:
Survey Date - Which is a date selector.
Surveyor - Which is a combo box.
KitchenRenewYear - Which is a text box.

If Someone was willing to start me off with how to do this then I can use the code for the remainder of the fileds I want to copy.

Three ways to programmatically duplicate a table in MS Access by VBA

Three ways to programmatically duplicate a table in MS Access by VBA Icon
Duplicating a table in Access manually is extremely easy - just Copy and then Paste the table object. The three screenshots below copy Products table, and then paste it to make a new table Products_Copy.

Macro will not paste

Macro will not paste Icon
Is there a way to get a macro to paste information copied from a form field in the parameter value window that the query will be based off of?

I am able to get the macro to navigate to the specified field and copy the contents, then opens the report which runs the query but stops at the parameter value window and does not paste the contents in. If I use ctrl+v, it does paste the information in and I can then press the ok button and have the report pop up. I want it to do this automatically and not require the user to enter the information themselves or have to push ctrl+v and then select the OK button.

Is this possible to do within Access itself or does this need to be performed via VBA?

How to Copy a Field and Paste in Another Table

How to Copy a Field and Paste in Another Table Icon
Newbe question. This is my first program. Access 2010

Have a table, Log Food, and need to populate a field called Food ID from another table, Food, with the same field name. My plan is to have a form Log Date and a subform Log Food with a button to lunches a pop-up form called Select Food. Im unable to figure out how to copy Food ID from the Select Food form and paste it in Food ID in the Log Food form/table. Im also thinking this method could be used to edit or add a record in Log Food. I was hoping it would be something like

[Log Food]![Food ID]=[Food]![Food ID]

Needless to say, it didnt work and Ill be the first to say I dont know what Im doing. I do have the tables and forms.

Is this a macro or VBA problem? Does the code go in Log Food form or the Select Food form? Could someone let me know how this should be done