How do I turn on Autocomplete in Access 2003 Forms?

  • Thread starter Thread starter Jojo
  • Start date Start date
Autocomplete ... what?

Comboboxes have a property that will help you "autocomplete", but it isn't
clear that's what you are looking for...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Autocomplete a field in which text is being consistently repeated, ie: the
name of a facility. I don't want to link to a table nor do I want to use a
drop down, things change too quickly to keep those up to date. Can it be
done?
 
There is no such thing in Access as Auto Complete. The closest there is is
the Auto Expand property of a combo box which moves to the first row matching
what has been typed in for each keystroke. But, that doesn't sound like what
you want.

Saying you don't want to link to a table or use a combo box because things
change too quickly really makes no sense. If you use a table or query as the
row source of a combo it is easy to add a new item to the list using the Not
In List event of the combo.

If what you are saying is you want to be reuse the the value entered in a
control for the next new record and continue using that value until a user
changes it., then you can assign the value to the control's Default Value
property in the control's After Update event:

Private Sub txtFacility_AfterUpdate()

If Me.NewRecord Then
Me.txtFacility.DefaultValue = Me.txtFacility
End If

End Sub
 
Also

The values for that combo box can simply be all of the "distinct"
values of customer name (for instance) in the table that you are
updating. No need to have a separate table of customer names.

If you do this you have to allow items to NOT be in the list. The next
time you type the new company name would be in the list.

If you use the "Not in List" event you will also need to change that
allow not in list property.

Ron
 
Back
Top