Why for the love of databases and normalization would you want to copy address data?
Normalize your data into tblAdress and tblResident and there is no need to do this!
this question is asked all the time. maybe you can make use of these, if you don't use anyone else's stuff already posted. the file "copy edited record to new" was done for a previous question asker. the file "Fill New Record From Previous Record's Data" is an illustration done long ago.
@ namliam
Thanks I dont have a customer table, users have to enter it within the field on the form, so i need to copy customer name address postcode fields ect
Thats not something that we wish to do - just looking for the user to copy customer name address ect to another form to request another order using the same address/customer details
You can use the AfterUpdate event of the Control holding your data to set the DefaultValue for the Field. From that time forward, until you either manually change the data or close your form, the data will be entered automatically in each New Record.
Code:
Private Sub YourControlName_AfterUpdate()
Me.YourControlName.DefaultValue = """" & Me.YourControlName.Value & """"
End Sub
This syntax is valid for Text, Number, DateTime and Boolean Datatypes.
You’ll need to do this for eachControl that you want to ‘carry forward.’
If you have a slew of Controls to do this for, you can use the Tag Property to mark the ones to be defaulted and then loop through them, setting the DefaultValue.
Go into Form Design View
Select all Controls you want to 'carry forward,' by pressing and holding down the <Shift> Key and clicking on each one.
Go to Properties - Other
In the Tag Property enter CarryForward (without quotes)
Now use this code:
Code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim ctl As Control
For Each ctl In Me.Controls
If ctl.Tag = "CarryForward" Then
ctl.DefaultValue = """" & ctl.Value & """"
End If
Next ctl
End Sub
Each of the "tagged" Controls' values will be carried forward into a New Record until you either Edit the data in a given Control or Close the Form or Access itself.