Copying data from one form to another

ewalker3

New member
Local time
Yesterday, 19:33
Joined
Nov 16, 2010
Messages
9
I have one form that had a button to copy the data from one table to another.
The code on click is the following:
Private Sub CopyToFlActive_Click()
DoCmd.OpenForm "frmFLActive", acNormal, , , acFormAdd
Forms![frmFlActive]!ENAME.Value = Me![ENAME].Value
Forms![frmFlActive]!EADR1.Value = Me![EADR1].Value
Forms![frmFlActive]!EADR2.Value = Me![EADR2].Value
Forms![frmFlActive]!ECITY.Value = Me![ECITY].Value
Forms![frmFlActive]!ESTATE.Value = Me![ESTATE].Value
Forms![frmFlActive]!EZIP.Value = Me![EZIP].Value
Forms![frmFlActive]!CFIRST.Value = Me![CFIRST].Value
Forms![frmFlActive]!CLAST.Value = Me![CLAST].Value
Forms![frmFlActive]!CADD.Value = Me![CADD].Value
Forms![frmFlActive]!CCITY.Value = Me![CCITY].Value
Forms![frmFlActive]!CSTATE.Value = Me![CSTATE].Value
Forms![frmFlActive]!CZIP.Value = Me![CZIP].Value
Forms![frmFlActive]!YEAR.Value = Me![YEAR].Value
Forms![frmFlActive]!DOCK#.Value = Me![DOCK#].Value
Forms![frmFlActive]!APPELL.Value = Me![APPELL].Value
Forms![frmFlActive]!APPEAR.Value = Me![APPEAR].Value
Forms![frmFlActive]!OUTCOM.Value = Me![OUTCOM].Value
End Sub

I've notice the last few days as I've played with this, on the form the data is to be copied two, everything except two fields (CLAST and EADR1) get copied and appear on the form. If I tab through the fields on the form the items are copied to, and tab past CLAST and EADR1) the data will appear?

any suggestions?

Also, if I want to view the copied data (multiple records) on the tblactivefrm what do i need to do, It doesn't show record 1 of x at the bottom but i do see the data if i click the table and go to dataview.


thanks for your help.

ed
 
Try putting
Code:
Forms![frmFlActive].refresh
at the end of your routine, see if that makes a difference.

Have you got the form's Navigation Buttons property set to no? if it's yes, the buttons and record counter should be at the bottom of the form in both form and datasheet view.
 
Two identical forms and "copying the data from one table to another" is suggesting database structure is not optimised.
 

Users who are viewing this thread

Back
Top Bottom