Turn Default Property On/Off

  • Thread starter Karen H. via AccessMonster.com
  • Start date
K

Karen H. via AccessMonster.com

I have a data entry form. A lot of the time the same information is being
entered on the 2nd, 3rd, etc data entry record with a few variations. Is
there a way to add a button or Menu a way to turn the default replication of
the previous record on if need? I think the default for opening the form is
not to replicate the previous record, but if the user know they are entering
several similar records, they can turn it on somehow.


Thanks,

Karen
 
G

George Nicholson

One of the options provided by the wizard when adding a command button to a
form is RecordOperations>Duplicate Record.
 
J

John Vinson

I have a data entry form. A lot of the time the same information is being
entered on the 2nd, 3rd, etc data entry record with a few variations. Is
there a way to add a button or Menu a way to turn the default replication of
the previous record on if need? I think the default for opening the form is
not to replicate the previous record, but if the user know they are entering
several similar records, they can turn it on somehow.

One way to handle this is, for each control that you wish to
automatically duplicate, to set its DefaultValue property in its
AfterUpdate event:

Private Sub txtFieldname_AfterUpdate()
Me!txtFieldName.DefaultValue = Chr(34) & Me!txtFieldName & Chr(34)
End Sub

This could be made a bit more sophisticated - say have an unbound
checkbox chkDup on the form, and check its value prior to setting the
DefaultValue property.

John W. Vinson[MVP]
 
Top