Copying

  • Thread starter Thread starter JohnM
  • Start date Start date
J

JohnM

I have a form for inputting data but some of the fields shall ahve the same
information, is it possible to get this information to copy automatically

thanks john
 
you don't want to copy all the information, you want to save the
information to a database and then read it somewhere else, right?

if your database doesn't work reliably, it's time to upsize to SQL
Server
 
Say you have a field named City, and another field name HomeCity. You would
add this code to the After Update of city to make HomeCity be the same.

Private Sub City_AfterUpdate()
Me.HomeCity = Me.City
 
John,
One method is to create a Default Value for the field... on the fly.
Let's say you had a text field called State on your form.
You create a new record, and enter "NH" (no quotes) in State.
Using the AfterUpdate event of State...
Private Sub State_AfterUpdate()
State.DefaultValue = "'" & [State] & "'"
End Sub
Now, every new record you create will have NH in the state field.
If you change that value to say... NY, then all new records after that
will have NY in the State field.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
Back
Top