How to duplicate records

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

Guest

I need to carry over information from one to another record, previously enter.

I would like to code an Command Button [Add] . Everytime the use click add
some info from the previous record is carried over.
 
Why not just set the Default Value so that whatever the last value in a
field was, becomes the Default Value entered for a New record.
Let's say you have a field called City. Try this code...
Private Sub City_AfterUpdate()
City.DefaultValue = "'" & ADDR2 & "'" ' that's a single quote
within doubles...
End Sub
If you enter Boston in City, then the next New record will have Boston as
enetered as the Default. If you later eneter New York, then from then on,
all new records will have New York as the default.. etc etc.

hth
Al Camp
 
hi,

say i have a form on which my field's name is "Patient Number", using your
approach what would i do. i guess i don't quite understand how you have a
field called "City" into which you clone or duplicate "'" & ADDR2 & "'" --
where did you get that ADDR2 from?

AlCamp said:
Why not just set the Default Value so that whatever the last value in a
field was, becomes the Default Value entered for a New record.
Let's say you have a field called City. Try this code...
Private Sub City_AfterUpdate()
City.DefaultValue = "'" & ADDR2 & "'" ' that's a single quote
within doubles...
End Sub
If you enter Boston in City, then the next New record will have Boston as
enetered as the Default. If you later eneter New York, then from then on,
all new records will have New York as the default.. etc etc.

hth
Al Camp

iholder said:
I need to carry over information from one to another record, previously
enter.

I would like to code an Command Button [Add] . Everytime the use click
add
some info from the previous record is carried over.
 
Back
Top