General :: Copy Single Record In A Table And Paste It Predefined Number Of Times
Sep 25, 2012
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 cells back from Excel and then paste this range back into the Access table.
This works but is long winded; what I would like to know is is there a simply way of achieving this.
Is it possible to copy a record 'n' number of times, incrementing the date by either days, months, weeks etc?
I have a regular payments table that will need to be edited at some point should either dates, or amounts change, but... regardless of the size of the table, it's not a problem, as these will be moved to a different table and deleted once paid.
Given the example, would it be possible to copy this record and additional 5 times, incrementing the date by one week.
I would like to do a loop but never done one before, basically i want to copy the current record by the number of times specified in a quantity field
So if the quantity field in the record says 5 then copy that record 5 times (I have managed to create the copy and paste code but dont know how to make it do it 5 times
I am trying to copy a table and paste as another name. I do this all the time with this table as it is a process I have to do. It is giving me a -1524 error. I also tried to export it to another database and it won't allow that either. I get the same error.
I have tried this with other tables and it does fine.
I want to limit the numer of times a record can be entere into a table. After a record has been entered 3 times, I want an error message or validation rule to tell me it can't be done.
I have a database that is tracking donations for my organization. I have some members who donate the same amount every month. Is there away to copy the records and paste them with the current date in the "Date Paid" field, and do this "Update" once a month? As opposed to typing in 200 records each month? I would assume that I would have to run an update query which filters to just the members that pay each month, but the big question is how to copy and paste these records. I am using Access 2010, I have some VB ability, but not an expert by any stretch. My SQL is not strong at all either.
I want to be able to click a field and it copies the field value. Just as if I were using Ctrl+C. THen I can go to excel or internet an paste it. i have the code:
Its been a few years since I used Access, and despite searches I cant find what I'm looking for. I have a VERY simple form, with only one record on it - "address". I have some print buttons which will print that address to different size labels, and some navigation items, but only one actual record - which is "address" (in the table, this address is a MEMO)
I would like to have a command button that when clicked copies the current record, and opens an existing Excel Spreadsheet and pastes that address into (for example) cell C8
Can it be done easily? Is there a DoCmd.TransferSpreadsheet kind of secnario that works with current record only?
The GetDates Command BUTTON should generate the red data above, like:
Private Sub GetDates_Click()
Go to a new record Go to the field App_Freq and fill it with: Copy/paste the data from the field of the same name in the previous record Go to the field App_Date and fill it with: data based on this calculation using the PREVIOUS record fields: App_Date + App_Freq (which are days) Go to the field Action_Date and fill it with: data based on this calculation: App_Date (of current record now filled out - step above), minus 7 (days). End Sub
That's it!
All the dates format is set to medium date. An error message should come up in case App_Freq is empty, for example
Also note that the data can be manually changed at any time and should not revert to its last calculation. The button only generate data into a new record.
I have encountered several times, and now, that after using any "cut and paste" or "copy and paste" on VBA code in the event sub, even for a few words, Access does not allow me to exit when I answer 'Yes' to save the changes. It forces me to respond "No" to exit and re-enter any changes again without using copy or cut and paste.
This is very troublesome and error-prone in program development that the program statements cannot be moved or copies to another location of the program module.
I have over 30 TextBoxes and ComboBoxes on the form and about 20 pages of program code, using Access 2010 (same situation for Access 2013) on Windows7 PC with 4GB of RAM.
OK, here is a weird one, at least it seems weird to me. I have a field on a table, or query result, doesn't matter which, and it looks like this:"55264"25468"4562"123etc, etc.Now I need to copy that and paste it into the notepad in Windows. When I do that the pasted data looks like this:"""55264""""25468""""4562""""123"I have looked at it on the clipboard and it also looks like the above. I really need this data to paste to the notepad just like it is stored on the table (with one double quote only). It's one of those strange sounding things, please do not ask me to explain why...I just need it like that.Why the heck does the extra quote get added to the front and one get placed on the end?Test it yourself and see.Thanks
I have an Access database with linked tables from Sybase SQL Anywhere, via an ODBC data source. I have just linked the tables recently, all the data used to be in native Access tables. It is fairly common for members of our team to open these tables in datasheet view, and copy/paste several records to create new records, then edit a few fields on the new records. This used to work fine with native Access tables, but when we try it with the linked tables we either get an ODBC error - "primary key value already exists" or the new records show up with #Deleted.
The root of the problem is this: In the old Access tables, the primary key was an autonumber field, and Access was smart enough to assign new ID's when you copy/pasted records. In the linked table, the primary key is type "Number" in Access, and Access is not smart enough to let Sybase assign new ID's when you copy/paste records in datasheet view. Access is trying to force the existing ID's into the primary key field, and Sybase says "too bad so sad".
Of course, I could just write some quick append queries to copy/paste the data. And in the short term, that's exactly what I will have to do. But is there any way, long term, to allow members of my team to do it the "quick & dirty" way by copy/pasting in datasheet view? I have tried to change the primary key to an autonumber field in design view, but Access doesn't allow that. Is there a way to do it in code, or a way to force Access to allow Sybase to always handle the primary key field?
I've been in a new position for a new company for less than three weeks, and I need some help.
The Access database that we use has been in operation since 2002, and it has never been Compacted/Repaired (I asked my coworkers and supposed IT people, and they said "what's that?").
After adding *one* new field, I've reached the horrific "error 3190" (max 255 fields).
I've tried all of the following, allowing at least 12 hours for them to run, but I cannot: export the data to Excel import the data into a new database copy/paste the records (because there are 12100+ and the max is 9500, I think; and because of the way the dd/mm/yy converted itself to dd/mm/yyyy) or rename the table with the data.
Does anyone know how to exclude the header information when copying a record from an Access table and pasting it into Excel. When I paste into Excel, it is also pasting the header information from Access which I do not want. I only want the data to be pasted.
When I copy data from Outlook or MS Word that contains bullets or other HTML formatted text, into MS Access text control, the HTML tags are displayed in the tables.
The memo field in the table is set to Rich Text and so is the text control on the form.
Below is an example of the data I'm copying from Outlook email:
What I would like to do is have a field in a given record increment itself every time that record is selected. For example, say you have a table that stores items in the inventory: each item has a times_search_for_field.
Now, lets say a user runs a search which results in the following SQL:
SELECT * FROM Inventory WHERE experation_date=Today();
Now I want to have every record returned by that SQL statement increment it's times_search_for_field incremented by one. I'm just looking for the most efficiant way to do this.
I know I chould just have my asp .net code loop through the results and call an SQL UPDATE statement for each record, but it seems there should be a more efficient way of doing this.
I want to use to count how many times a record is displayed in the period and lesson field, in another table, so that this data can be used to show how many people are attending a class. e.g how many times people are attending art 1, by counting how many times art one appeared in the first table.
I have 2 tables , one table I want to use as temporary information the other to use as permanent information
For example if I have 6 records in one table , I want to be able to press a button that removes those 6 records from the temporary table and put them in the permanent table. Then later as I add more to the temporary data table again press a button and then temporary data is added to the permanent table.
Therefore the temporary table will always be empty when I press the button and the permanent table will keep adding the information I transfer across .
I have 2 tables...a lookup table with possible responses (i.e. yes, no, don't know) and the second with 8 fields that contain the values selected from the first table. Tables are related one-to-many. I need to count the number of times each of the responses shows from the lookup table shows in each of the fields in the main table. Have tried to query with the lookup field set to "group by" and each field set to "count".
Hi all, I get information sent to me on email. This information then needs to be transfered onto a database. the information is always the same. name ***** Date of birth **/***** consultant ****** ward BLA ******
Is it possible to copy and paste all the information in one go from the email and paste everything into its correct places on a form with one action? This would save alot of time & effort on the users part.
To speed up my input I copy a record and paste it.
Only trouble is that I have one field in the table that is dependant on the parent table. [The customers email address which I populate with a query/combo box. There could be many, depending who the order was for.]
Q: What function could I use after the paste funtion to ammend that field automatially setting it to 'null'
Q: I looked into WM_PASTE but I'm really struggling!