Copy Current Record To Different Table
Dec 4, 2006
Is it possible to copy the current record on a form to a different table?
Example:
Form Name = Training Orders bound to a table with the same name.
2nd Table Name = History
I need to export certin fields from the Training Orders Form into the History Table. Below is the way I am trying to make it happen, but it does not work.
With Me.RecordsetClone
.AddNew
![Forms]![History]![Last Name] = Me.[lastname]
.Update
Me.Bookmark = .LastModified
End With
End Sub
View Replies
ADVERTISEMENT
May 17, 2015
I created an unbound text box on a form that automatically pulls the current logged in user by using this:
Private Sub Txtuser_Click()
Me.Txtuser = Environ("Username")
The form grabbs the logged in user with no problems, however, I ultimately want this information to also end up in my table. So the form has three boxes (to keep it simple). The user will type their first name and last name manually on the form which the record source is this "table" where their name goes to the table last name =Field 1 and first name=Field 2 respectively. I want the unbound box from the form to place the logged in user in Field 3 for the current record.
View 5 Replies
View Related
Aug 4, 2013
I have a DAO.recordset called "rsSQLIn". This comes from a csv file by:
Code:
strSql = "SELECT * " _
& "FROM [Text;Database=" _
& strFolder _
[Code]....
While the validation runs a boolean keeps track of validated input and errored input.
After validation the validated input is dumped in the table.
Now what I want is de saving the errored record from "rsSQLIn" to be copied to a new .csv file.
The problem I have is that I cant seem to get the current record from the recordset "rsSQLIn". How do I reference this? I need the complete set of 24 fields being the same within "rsSQLIn"
View 3 Replies
View Related
Jul 13, 2014
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?
View 8 Replies
View Related
Sep 20, 2013
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
Code:
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdCopy
DoCmd.GoToRecord , , acNewRec
DoCmd.RunCommand acCmdPaste
View 2 Replies
View Related
Aug 27, 2013
I have a projects Database with: Projects_Table, Staff_Table.
Both tables has forms for data entry or update. Each project has many staff allocated to it.
In the Staff_Form I placed the Project_Code in the form heading section. The form opens based on a search criterion on the project_code so it shows the staff for that project only. The issue is when I try to add a new staff for that project on the Staff_Form, the project_code stays blank in the staff_table.
What I need is that the project_code in the staff_table for that newly added person to have the same project_code on the opened form. Simply to link the staff to the project they work in when I add them using the form.
View 1 Replies
View Related
Mar 28, 2005
;) Hey everybody,
I am working on a database used in recording device characteristics/test information. The main table of information has dozens of columns for test/part detailed information. When inputing the data for each specific test, many of the info. details are repeated when testing say 20 devices of the same part all at once. Rather than retype every piece of detailed information in every field, everytime, is there an easier way? Does anyone know of a way to make specific fields copy/paste the previous record's information in the fields automatically when a new record is created? Please, if anyone could help or has ANY ideas, let me know...
Thanks
gunwax
View 9 Replies
View Related
Mar 18, 2014
I have a database for staff to request checks to be cut. I have one table with a group of regularly used payees & addresses. A second table stores data for each individual check request. I need to be able to copy a record from the addresses to the check request. I do not want to add all addresses to the address table, as it is only for commonly used payees. So from the check request table, I am able to lookup a payee, which opens the address form to display the address. I need to be able to copy the displayed address to the open check request form.
View 3 Replies
View Related
Jul 9, 2014
I have a form with a sub form. when a record is choosen in a combo box the sub form is filled out with a record.
what I am trying to do is have a button that will copy that record to a history table then delete it off the the main table.
I cheated by using the wizard to get the code to delete the record but I am having troubles modifying the code to copy that record to the history table. Here is the code below. I have tried to insert code in several places but it just errors out.
'------------------------------------------------------------
' Master_tbl_sub_fm
'
'------------------------------------------------------------
Function Master_tbl_sub_fm()
On Error GoTo Master_tbl_sub_fm_Err
With CodeContextObject
On Error Resume Next
[Code] ....
View 8 Replies
View Related
Aug 29, 2006
Hi Everyone
I wonder if anyone can help me with code that i can use to copy a single record from table1 to table2
that i can use in a subroutine.
Thanks in advance to anyone that may offer some help
Kindest regards
Tony
View 1 Replies
View Related
Jul 20, 2005
Is it possible to send a copy of a record to another table already created? if so what is the sql statements to do so or any other ideas that you might have.
THANKS!!!!!!!!!!!!
View 1 Replies
View Related
Mar 16, 2015
I have a form to edit records on table A and i would like to be able to put a button on the form to copy that record from table A to table B. The code i have on the button so far is as follows:
<UserInterfaceMacro For="Command55" Event="OnClick">
<Statements>
<Action Name="OnError"/>
<Action Name="RunMenuCommand">
<Argument Name="Command">SelectRecord</Argument></Action>
<ConditionalBlock><If><Condition>[MacroError]=0</Condition><Statements>
[Code] ....
I want someone to be able to search a product for an order, edit it to reflect how many they are taking but at the same time have a button to copy that record to table B. Then after all the products have been found and copied to table B, they can print of the report based on table B and give to the factory floor so they can find the stock, run a query to clear table B and start on the next order.
I have everything working but copying the records across.
View 1 Replies
View Related
Jun 1, 2013
I was wondering if deleted records to be copied to a new table?
View 2 Replies
View Related
Apr 11, 2012
Actually I have a small form of customer details, that i made in excel, the field name mention below,
Customer Details Table
First Name
Last Name
Contact Detail
Address Detail
Postal Code
Last Purchasing Date
Remark
Now i want to make a search form like this
Search Form
Contact Details
& the result is show which I insert the contact number.......
View 1 Replies
View Related
Dec 13, 2013
Access 2013
I'd like to copy checked records from one tale to another after a user presses a button.
Ex.
The table 'Equipment List' has a checkbox column that the user can check off as they scroll through the table on a form. When the user presses a button, after they are completed with all of the checkboxes, each checked record is then copied to 'Equipment Transactions' to keep a record of which pieces of equipment were used for the day.
View 1 Replies
View Related
Feb 3, 2005
I have a table with employees’ information. I want to copy all records in this table to another existing table “WorkTimes”. I do not want to edit my employee table, so therefore I want to copy all records to another table before editing/adding information in other fields. How I can do that with a macro or module?
Thanks in advance.
View 3 Replies
View Related
Oct 24, 2005
hey guys,
how can i make a query to copy records from one table to the other, and leave out one record. the record has corrupted somewhere and is causing havoc on some forms.
cheers
View 4 Replies
View Related
Aug 1, 2014
I have a form with 2 subforms, each based on their own table. One displays categories of invoices (e.g. rent, electricity, etc.) including some details like monthly costs.
I would like users to be able to select one of those categories and copy this to another table, after which they can enter on what date the invoice was paid, to make a history of payments.
At first I based fields in the history table on fields in the categories table so that you could simply pick a category from a combobox. I had an after update event on that combobox that also automatically set the 'costs' combobox to the matching price.
Worked fine, but had one snag: if I update the costs of a category in the categories table (e.g. the rent goes up) then all the costs in the history table was also updated because the fields got their info from that table.
So now I no longer have field from the history table based on the other table, and want to use 'set value' to copy values from one table to the other. I'd like the user to be able to somehow select a category with a single click on a button, and getting the info for that category copied. However, how can I get access to know from which record I want the fields copied?
Or is there a completely different way to get a history of payments that works much better?
View 4 Replies
View Related
Oct 29, 2006
Im trying to make a button that sends the current open record information to another table. I created an append Query but it is pulling nothing. Can someone help me figure out how to send the current open file to a seperate table?
View 4 Replies
View Related
Aug 26, 2013
I have a database that includes the following items related to my question:
- Tables: tblCases, tblPeople, tblPeoplePerCase,
- Forms: frmCases, frmPeople, subfrmPeoplePerCase, frmSearchPeople
What I'm trying to do is automate the process of adding a selected person to a particular case. What I'm thinking is that frmCases (which includes subfrmPeoplePerCase) will include a button to add a person to the case. Once clicked, frmSearchPeople would open. Once a person is selected and frmPeople displays their information, a button would then be displayed/enabled on frmPeople to add them to the current case in frmCases. Once this button is clicked, it would display a message box asking to confirm if PersonID should be added to CaseID. If confirmed, the information is then appended to tblPeoplePerCase (which includes PersonID, CaseID). The user is then brought back to frmCases and the subfrmPeoplePerCase displays the newly related information.
View 1 Replies
View Related
Dec 17, 2007
is there an easy way to copy the current record on a form when clicking a command button such that a snapshot of that record is copied to a table for archiving purposes?
the table has about 120 columns so it is cumbersome to write an Insert Into sql statement within VBA code.
what i am attempting should be quite straightforward...i just want to take the current record in its entirety that is from a single table and append it to another table of the same structure.
any help would be appreciated!
View 12 Replies
View Related
Mar 8, 2014
I have this table that records sales events for properties, with multiple sales records for some parcels. Each parcel has unique field: MapTaxlot. I want to create a select query or make table query that shows only the most recent sale event for each parcel. Instrument_Date is the date field for the sales records.
See attached example of the data table below.
What is the simplest method to accomplish this?
TableSnip.JPG
View 5 Replies
View Related
Jul 17, 2014
I am trying to open a form with some records taken from one table, then alter couple of data in it and after that most importantly to append current records into a different table. The reason I need to append is that I need to keep track on every occurrence on same fields.
It looks like this:
SerialNumber(Field 1), ServiceDate(Field 2), ServiceEngineer(Field 3)
Now suppose same serial number called again and asked for service, I need to still keep record on how many times this same serial number had service.
View 9 Replies
View Related
Jul 30, 2007
Hey all,
I am working on converting someones Paradox Database to Access and making some modifications.
I have a table with people in it and they are linked to a number of interests. But i am struggling to create a query so that on each page of the form for the person i can call the interests and display them on the form as a list...
If anyone could point me in the right direction that woul dbe appreciated!
Give me mysql and a bit of php anyday!! hehe
I am using Access 2007 but i have used access before so i should be able to work my way through instructions for 2003.
thanks
RF
View 4 Replies
View Related
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.
View 3 Replies
View Related
May 3, 2015
I have a table, with a related value in another table. E.g. A Items table with a batch value from another table.
I have a form to enter how many of these items has been used and from which batch number they belong.
The batch number is from a dropdown, and batches can be finished(exhausted) and marked such in the table so they no more show in the dropdown.
All this works fine, until, I go back to a entry which was from a batch that has been finished. The combobox is empty although the (Already finished) batch number is mentioned in the table. This is perfectly normal as my query for the combobox is :
Code:
SELECT ItemBatch.ItemId, ItemBatch.ItemBatchNumber, ItemBatch.Finished, ItemBatch.ItemName
FROM ItemBatch
WHERE (((ItemBatch.Finished)=False)
AND ((ItemBatch.ItemName)=[Forms]![ItemMasterForm]![ItemDataSheet].[Form]![ItemName]));
What I want is to show the current batch number as well. I tried to make this query get the current value, but wasn't successful. I tried to make a calculated field based on the dropdown and show its value.
Is there any way I can show the batch number in the datasheet? I have to use a datasheet and not a form, because there will be many sub records for the main form, and having a form will be very uneasy.
View 3 Replies
View Related