AutoComplete function

T

TRM

I'd like to let Access display a list of possible entries built up from
previously entered column data so as the users can select the one they want
without typing anything.
I'd like to let it show on entry form using something like list box probably.

Excel calls this function AutoComplete, but I can't find the equivalent in
Access. Anyone knows how to do it?
 
B

BruceM

You could set the Row Source of the combo box or list box to something like:

SELECT DISTINCT [SomeField] FROM [YourTable] ORDER BY [SomeField]

where SomeField is the name of the field to which the combo/list box is
bound, and YourTable is the form's Record Source table.

In the form's Current event, or the combo box After Update event if you want
the list to reflect the new entry right away:
Me.cboYourList.Requery

whre cboYourList is the name of the combo box or list box.
 
B

BruceM

You could set the Row Source of the combo box or list box to something like:

SELECT DISTINCT [SomeField] FROM [YourTable] ORDER BY [SomeField]

where SomeField is the name of the field to which the combo/list box is
bound, and YourTable is the form's Record Source table.

In the form's Current event, or the combo box After Update event if you want
the list to reflect the new entry right away:
Me.cboYourList.Requery

whre cboYourList is the name of the combo box or list box.

Be sure the combo / list box has Auto Expand set to Yes. That is sort of
the equivalent of AutoComplete.
 
B

BruceM

You could set the Row Source of the combo box or list box to something like:

SELECT DISTINCT [SomeField] FROM [YourTable] ORDER BY [SomeField]

where SomeField is the name of the field to which the combo/list box is
bound, and YourTable is the form's Record Source table.

In the form's Current event, or the combo box After Update event if you want
the list to reflect the new entry right away:
Me.cboYourList.Requery

whre cboYourList is the name of the combo box or list box.

Be sure the combo / list box has Auto Expand set to Yes. That is sort of
the equivalent of AutoComplete.
 
B

BruceM

Not sure why this posted so many times. I tried to add something just
before it left my outbox, and my newsreader seems to have improvised.

BruceM said:
You could set the Row Source of the combo box or list box to something
like:

SELECT DISTINCT [SomeField] FROM [YourTable] ORDER BY [SomeField]

where SomeField is the name of the field to which the combo/list box is
bound, and YourTable is the form's Record Source table.

In the form's Current event, or the combo box After Update event if you
want
the list to reflect the new entry right away:
Me.cboYourList.Requery

whre cboYourList is the name of the combo box or list box.

Be sure the combo / list box has Auto Expand set to Yes. That is sort of
the equivalent of AutoComplete.

TRM said:
I'd like to let Access display a list of possible entries built up from
previously entered column data so as the users can select the one they
want
without typing anything.
I'd like to let it show on entry form using something like list box
probably.

Excel calls this function AutoComplete, but I can't find the equivalent
in
Access. Anyone knows how to do it?
 

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

Top