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]