Topics Search

Copy from one subform to another.

Copy from one subform to another.
Views: 14
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:

More topics

 

Copy all record from subform

Preview
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

Preview
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)

Preview
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

Preview
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

Preview
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.

Preview
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?

Preview
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

Preview
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

Preview
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

Preview
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