Deplicate selected values in Forms

sadiq92

Member
Local time
Today, 17:25
Joined
Jun 4, 2020
Messages
30
Hello,

as you know when adding buttons on forms you can add many “ ready-make” buttons including duplicate record button. However, the duplicate button will duplicate all the values from the last record.

Is there a way I make the duplication occur only for selected fields and make the other fields empty???!!!
 
if the record shown in form/table is the Duplicated record, not in New record,
you can just blank out the fields you don't want to be duplicated:

'code after running duplicate record
...
...
' blank out some fields
Me!Field1 = Null
Me!FieldX = Null
' save changes
Me.Dirty = False
 
if the record shown in form/table is the Duplicated record, not in New record,
you can just blank out the fields you don't want to be duplicated:

'code after running duplicate record
...
...
' blank out some fields
Me!Field1 = Null
Me!FieldX = Null
' save changes
Me.Dirty = False

where I put this code?
 
inside the code of your "ready-made" button (duplicate record).
 
I answered a post a while back about duplicating records in a sub-form. I gather that you want to duplicate records on the main form, so this might only be a curiosity for you.

If it's of Interest you can download it here:- https://gum.co/SubRecDuplicator for a limited time by using the coupon code:- freetodayonly

For more information about this method and way it was developed see my blog on Nifty Access here:-

 

Users who are viewing this thread

Back
Top Bottom