Copy previous record fields into new record form fields

For reference - do not use field or object names with embedded spaces - to avoid syntax errors that will materialize sooner or later.
 
Sorry. As already pointed out, the issue was the embedded space in Product Line. The code should have an underscore as shown in RED below

Code:
Option Compare Database
Option Explicit

Private Sub Product[B][COLOR="Red"]_[/COLOR][/B]Line_AfterUpdate()
Me.[Product Line].DefaultValue = "'" & Me.[Product Line] & "'"
End Sub
 
If you don't mind spending some time to copy paste some Code, try this link for duplicating fields from previous record: https://www.msaccesstips.com/2012/02/duplicating-fields-with-conditional.html

Hi apr
That's a neat use of the tag property. Just added to your rep points!

If its OK with you, I'd like to add a link to that webpage from a similar item on my website where I use the tag property to set the visible/hidden, enable/disabled, locked/unlocked state of a group of controls at once

EDIT
Your site would also be a useful addition to this webpage Useful links. Is that also OK with you?
 
Last edited:
Hi apr
That's a neat use of the tag property. Just added to your rep points!

If its OK with you, I'd like to add a link to that webpage from a similar item on my website where I use the tag property to set the visible/hidden, enable/disabled, locked/unlocked state of a group of controls at once
See http://www.mendipdatasystems.co.uk/set-controls/4594398114

EDIT
Your site would also be a useful addition to this webpage Useful links. Is that also OK with you?



Ok, I will add your link to my Website.


Sent from my iPhone using Tapatalk
 
Hi apr
Thanks for that as well. I'll update my website accordingly later.
 
Hi apr
That's a very quick way of adding useful links! Wish I'd thought of that :cool:

Now added links to your site on the following pages:

I think that covers it!
 
Last edited:



Hi isladogs,

Sure it does. Thanks a lot.


Sent from my iPhone using Tapatalk
 

Users who are viewing this thread

Back
Top Bottom