Copy/Paste Date Multiple Records

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

Guest

I'm helping a person who is used to working in Excel, create a database. The
data entry form is a continuous form, which is what she wants, and each
record has 10 fields. Since she will probably have at least 10 records at
one time that she enters that will have the same date, she would like to just
copy the date from the first record and paste it into all the affected
records--like she would do in Excel. Is there a way to do this easily? TIA
 
I'm helping a person who is used to working in Excel, create a database. The
data entry form is a continuous form, which is what she wants, and each
record has 10 fields. Since she will probably have at least 10 records at
one time that she enters that will have the same date, she would like to just
copy the date from the first record and paste it into all the affected
records--like she would do in Excel. Is there a way to do this easily? TIA

A couple of ways. Copy and paste isn't really appropriate in Access
(you can do it one field at a time but it's hardly worthwhile!)

Instead, she can type Ctrl-' (hold down the control key and type the
singlequote key) to "ditto" the entry for this field in the previous
record.

Or, you can put a little bit of VBA code in the AfterUpdate event of
this textbox on the form:

Private Sub txtDateField_AfterUpdate()
Me!txtDateField.DefaultValue = "'" & Me!txtDateField & "'"
End Sub

This will make the field "sticky" - it will default to the previous
record's value; if you overtype that default the new value will then
become the default for the next record.

John W. Vinson[MVP]
 
Thanks John-appreicate it!

John Vinson said:
A couple of ways. Copy and paste isn't really appropriate in Access
(you can do it one field at a time but it's hardly worthwhile!)

Instead, she can type Ctrl-' (hold down the control key and type the
singlequote key) to "ditto" the entry for this field in the previous
record.

Or, you can put a little bit of VBA code in the AfterUpdate event of
this textbox on the form:

Private Sub txtDateField_AfterUpdate()
Me!txtDateField.DefaultValue = "'" & Me!txtDateField & "'"
End Sub

This will make the field "sticky" - it will default to the previous
record's value; if you overtype that default the new value will then
become the default for the next record.

John W. Vinson[MVP]
 
Back
Top