Preventing writing in a combo box field

G

Guest

Ok this is my problem:
I've a combo box with several employee names. Of course that when the
employee is chosing it's name it writes the first letter so that the combo
box filters the names to the closest one. Access then higlightes the employee
name execpt the letter he wrote.
Employee then hits enter and Access displays its full name, has in the combo
box options, neverthless I have a hidden form that copies employee name to
feed other forms. The problem is that if employee chooses is name has
discribed, Access will only select all the other letters of his name execpt
the one he wrote. example: assuming employee worte "P" and his name is Paul,
Access will write "aul" in all other forms.
what I want is a way to prevent employees from writing in the combo box,
without invalidating them from choosing their names from the drop down
options.
Is this possible?
 
J

Jeff Boyce

If I am understanding your situation, you could use the LimitToList property
of the combobox to prevent users from adding any new text.

If you wanted them to be able to create a new entry, you would use the
NotInList event of the combobox -- Access HELP has specific examples and
syntax.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
U

UpRider

.Employee then hits enter and Access displays its full name, has in the
combo
box options, neverthless I have a hidden form that copies employee name to
feed other forms.

Maybe the problem is here. What event and what code causes you to get the
bad names?

UpRider
 

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