Copy from one subform to another.

I have a main form - AddProducts (MF)- this form has two subform within it. One subform has a list of all the products on my database(SF1). The other subform is related to products related to a quote(SF2). I have an "add" button. What I want to happen is when I click the "add" button the record highlighted/selected on the main products subform (SF1) is added to the quotes subform (SF2).

Not the best at VBA.

I tried a simple:

Forms!MF.SetFocus
Forms!MF!SF2.Form.SetFocus
DoCmd.GoToRecord , , acNewRec
Forms!MF!SF1.Field1 = Forms!MF!SF2.Field1 - but it didnt like that

Sponsored Links:

Related Topics

Copy all record from subform
I have main form(Review) which contain 2 subforms:
1- Subform (Disciplines) which contain subform (JournalList)
2- Subform (Review Order)

what I am asking about is how with ClickButton I can copy all records in (Journal List) Subform to (Review Order) Subform

both (JournalList),(Review Order) have the same Fields (JournalID,JouranlName,ImpactFactor


Copy all record from subform
I have main form(Review) which contain 2 subforms:
1- Subform (Disciplines) which contain subform (JournalList) 2- Subform (Review Order)

what I am asking about is how with ClickButton I can copy all records in (Journal List) Subform to (Review Order) Subform

both (JournalList),(Review Order) have the same Fields (JournalID,JouranlName,ImpactFactor)


Copy values of Main and Subform (only main form working)
I need to copy a main form and subform's values to a new record. I can get the main form to copy its values over with the following code:

DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdCopy
DoCmd.RunCommand acCmdRecordsGoToNew
DoCmd.RunCommand acCmdPasteAppend

However, this does not affect the subform at all and just leaves it blank. I have been scouring the web and have found what I thought would be viable methods such as setting focus to the subform and such. But nothing seems to work.

What is the best way in VBA to copy the values of fields in a subform so that I can combine it with the code above?


Copying data from subform to report
my report should print all the data displayed in my form. so what i did was just copy everything in my form to my report(i'll just change the control source manually). but my problem is when i copied my subform an error occurred stating that the name of my subform is mispelled, etc. how do i copy my subform to my report?


Copy data from subform to a new table
I have created an “in progress” column in my main table with a Yes/No data type. I have created a form with a query as a subform that shows me all the parts that are due in the next two weeks, and I want the user to check Yes (in the subform) if he hand it in.

Later I plan to create a tab that will show me all the parts that are in progress, but my problem is that I cannot change any data in the subform or the query.

Is there a way to edit the data in the subform? Or can I copy specific rows from a subform to a new table?


Copy value from one subform and put it into another continuous subform.
Here is code I am using to copy a value from a subform to a continuous subform.

[CODE]

The problem I am having is that when I click the button, it adds the cleanerid to the first record in the continuous form, and when I click it again it just changes the first row/recordcleanerid value, rather than creating a new record below?


how to copy / paste records in subform?
I have a mainform with a subform. As I often need to input similar records in the subform, I made 2 button to copy the record and then amend some fields so that it becomes a new record. For copy I have this button:
Me.subform.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
Then for paste I have this button:
Me.subform.SetFocus
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdCopy
DoCmd.RunCommand acCmdPasteAppend
But in practise I can only copy one record, no matter how many records I have selected


Subform : Copy selected fields from current row to new row
Overview
- Subform called 'Time'
- Subform fields are named:

Well Ref - this is the well reference
Start Time - self explanatory
End Time - self explanatory
Activity - combo box selection
Quantity - integer value
Another Field 1
Another Field 2
Another Field 3
Another Field 4

Problem:
When entering the first record in the subform, the following data above is populated and takes some time due to network issues.

To mitigate key strokes in new records and expedite the process in the subform, I would like to copy the previous subform record to the new records (when it has been selected / focused).

The fields I would like to copy are:

Well Ref - this is the well reference
Another Field 1


copying field info from subform
Have a subform with a combo box on a main form. In some instances, with selection of combo box on subform, I want to copy field content from subform to main form text boxes. The firstfield of subform (folder_print) "SO" copies to main form (tbl_scanned) but will not switch back to subform with .SETFOCUS to copy
content of field "CU". The .SETFOCUS to mainform appears to work correctly ..


Tabular Control Code
I have a form with a tabular control and one of the tabs contains a subform.

I want to put a button in the subform that will automatically create another tab in the tabular control with another blank copy of the subform in it. I need to do this because the subform contains data from a query that is in a many to one relationship with the data in the main part of the form, and it is possible sometimes that the user will need to enter additional recordsin the subform for the one record that is in the main part of the form.

By having a button that automatically opens a new tab with a blank copy of the subform he will be able to do so easily.

What code should I write for the click event of the button on the subform to accomplish this?


Tabular Control Code
I have a form with a tabular control and one of the tabs contains a subform.

I want to put a button in the subform that will automatically create another tab in the tabular control with another blank copy of the subform in it. I need to do this because the subform contains data from a query that is in a many to one relationship with the data in the main part of the form, and it is possible sometimes that the user will need to enter additional records in the subform for the one record that is in the main part of the form. By having a button that automatically opens a new tab with a blank copy of the subform he will be able to do so easily.

What code should I write for the click event of the button on the subform to accomplish this


Copy last record in subform
I have a main form "Transaction Form" and a subform "BillingSubform", subform is in datasheet view. One of the columns name is "DiagCode1".

Simple question is what do I do to copy the last value of a column in my subform into a the same column of a new record? I would also like to what is the syntax to specify a certain column and row of a subform in datasheet view?


Copying from Subform?
I am trying to copy an entire record into a new record. On the current form it works just fine however, the subform is where I am having the problem. I'm trying to refer the code to the subform and it is not finding it. Here is a portion of it. I am really stuck on this.


Copy data from one subform to another in another form
How can I copy data from a subform in one form to another subform in another form using code?

Here I have a form called "Customers" which have a subform called "Unpaid Orders" which display the customer's unpaid orders. Both the form and subform is created from seperate tables. What I want to do is create a button in each record in "Unpaid Orders" so that when I click it a new record is opened in "Orders" form with the data in the "Unpaid Orders" fields copied to the fields in "Orders Subform


Trying to reference a value in a subform with a query
I've forgotten how to reference a value which is in a subform, I'm currently using the QBE and the criteria is the current value in the subform which I wish to copy (but initially I am just trying to select it).

Can someone remind me how to reference a value in a subform from a main form or from the QBE?


Copy subform
I apologize if this has been aswered elsewhere. I've looked, but haven't found any clear answer on this. I'm also very new to VBA, and I don't really know what I'm doing.

I have the following setup:

Form
-Record1
--data1
--data2
--data3
--Subform1
---recordA
---recordB

I need to copy data1, data3 and Subform1 from Record1 and enter it into a new record, Record2, which also has a subform, Subform2. I've figured out how to copy data1 and data3, but I don't know how to copy Subform1. Alternatively, I could copy recordA and recordB from Subform1 and enter those into Subform2, but I don't know how to do that either. It seems like it should be similar to copying data1 and data2, but the answer is eluding me.


Hidden Forms and Subforms
I'm in the process of editing and expanding an existing database. Basically all I need to do is to copy what is already there and change the record source. I can open the form that I need to copy however this form does not appear in the forms list (neither does the subreport on the form). Any ideas how to find this form and subform?

I've attached a copy of the database, if you open the form "Club Secretaries Contacts" then click on one of the buttons at the bottom i.e. "Summer Sunday" this will open the form I can not find. The subform I can not find is on this form


Copy recordset from one subform to another
I have two subforms in different parent forms. One of the forms is simply a method of setting the default values. The other form is supposed to lookup those default values when a new record is made. A am struggling to make it copy all of the data. To start I'm only trying to make it copy one field. I've swear I've seen it work a time or two, but if it's working at all it's certainly not consistent.

Anyway, in the attachment you can go to frmEquipment. In the dropdown at the top right select 'Monthly', then hit the button. In the new form that opens, it's subform should be getting the values from frm2404defaultsSub.

You can see my attempt at the bottom of the button's click event.


COPY records from SUBFORM and PASTE to EXCEL?
i have a subform with rows of data, i will add a button. when the user clicks the button, all the rows on the subform will transfer to a an excel spreadsheet with the headers included.


COPY records from SUBFORM and PASTE to EXCEL?
I have a subform with rows of data, I will add a button. when the user clicks the button, all the rows on the subform will transfer to a an excel spreadsheet with the headers included.