repeating text in access

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

Guest

I am trying to set up a data base and in small enough town that over half
have the same town state and zip code how can i get this to auto fill like
excel does when you have repeating text.
 
I am trying to set up a data base and in small enough town that over half
have the same town state and zip code how can i get this to auto fill like
excel does when you have repeating text.

Two ways:

- Set the Default property of the fields to the desired name; e.g. in
my small-town church database I have the City default to "Parma" and
the state to "ID".

- Or, more dynamically, you can use a Form to do your data entry; in
the AfterUpdate event of the City textbox (which I'll call txtCity)
click the ... icon, invoke the Code Builder, and put code

Private Sub txtCity_AfterUpdate()
Me!txtCity.DefaultValue = Chr(34) & Me!txtCity & Chr(34)
End Sub

This will make data entry into this field "sticky" - so if you have
ten entries for Parma followed by six for Wilder, it will use
whichever you most recently entered.

John W. Vinson[MVP]
 
Make it a combo box and for the source, pull all the values previously
entered in that field.

OR

Simply set the default value for the fields.


OR

Hit CTRL - ' to copy the value from the previous record.


Hope that helps,

Rick B
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top