View Full Version : Validation Issue ????


Nocal
02-18-2002, 06:00 AM
Just started developing using Access and was playing around with the combo/list box. Both were linked to a table to get their available lists. One appears to force the user to select a value while the other allows the user to type-in or select a value. When the user is allowed type in a value it doesn't ensure that it exists in the associated table.

E.g. Table Names has 3 entries 'John' 'Paul' and 'Frank'.

The dropdown is associated with table Names and has all three names available for selection. However I can go in and type James and the system will accept it withput ensuring it exists in the Names table.

My problem is that if I have 400 names I'd like the system to allow the user to type in the name or select it from the drop down. Selecting a single name from a drop down can take all day. If the user wishes to type the name in they should be able to. The system should check to ensure the name exists in the Name table - I just can't get it to validate whats been typed in.

I've tried messing around with validations etc but have got nowhere. Any help would be appreciated.

Fizzio
02-18-2002, 06:34 AM
2 things to try.
In the combo-box properties, ensure that Limit To List is set at yes. This will then only allow users to select items you have 'placed' in the combo box.
Also if you set the Auto Expand to Yes, as you type, Access will guess what you are tring to type and fill in the rest of that word/name.

HTH.

ps If you are storing the selection from the combo in another table, store the ID field and not the data displayed field. This ensures that you do not duplicate data.

Nocal
02-18-2002, 06:53 AM
Thanks Fizzio. I figured it would be something easy. I'll give it a try.

Thanks again.