Oh, sorry... Code. They are not related but will be the same name, type, size.Using code or manually? How are these forms related to each other? Are they bound to the same table?
With Forms("Form2Name")
.ControlName = me.ControlName
.control2Name = me.Control2Name
...
.Control6Name = me.Control6Name
end with
Is this the copy or the paste? I don't see the form names? Is controlName the fields?You should be able to do something like this in a procedure
Code:With Forms("Form2Name") .ControlName = me.ControlName .control2Name = me.Control2Name ... .Control6Name = me.Control6Name end with
Where controlName is substituted for your real names.
Can you explain your example more? Where are the field names, where are the form names?Is this the copy or the paste? I don't see the form names? Is controlName the fields?
In a database copying data is not normally done. This usually hints that your tables are not set up correctly. Can you post your database?Not exactly sure what you mean.
Your tables might be correct, cannot say. But in general when someone want to copy from one form to another it hints that the table design is not correct. The beauty of a DB is that data only needs to be stored once and can be displayed in endless ways. I have built thousands of Access databases and do not recall ever wanting to copy and paste from one form to another. If you want to provide your db we can look at it. There may be a betters solution than copy and paste such as an insert query.I simply want to bring certain info form some fields (from form 1) and put that info into another form (form 2) So, when I'm in form 2, I don't have to reinput the data.
Did you have any more thoughts on what I want to do?Using code or manually? How are these forms related to each other? Are they bound to the same table?
That works pretty nice. Anyway to have it paste into a specific record and not paste as a new record?Here is a demo doing a simple copy the fields.
Perfect!!! Thanks!The code had a line to move to the new record. If you remove it, it will update the current record in Form 2
Code:' DoCmd.GoToRecord acDataForm, "Form2", acNewRec