Populate field in new record with last record's value

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way, that if a user clicks the 'new' record selector button, that
a new record can be created with a default field value from the last record?
I know I can do it in a button, but I'm trying not to hide the record
selector buttons. Thanks.
 
Alex said:
Is there a way, that if a user clicks the 'new' record selector button, that
a new record can be created with a default field value from the last record?
I know I can do it in a button, but I'm trying not to hide the record
selector buttons.


You can use the control's AfterUpdate event to set its value
as its DefaultValue (for any new records that are added
later). The code for this is:

Me.controlname.DefaultValue = """" & Me.controlname & """"

Note that this will reset the default value any time a user
enters or edits the value, but not if the default value is
accepted as is.
 
Back
Top