Detect error and prompt if not in list

M

maxinemdk

Hi there! I have a table that contains a specific list of alpha numeric
entries of which there are no duplicates. In the form's box where this table
is linked, we can manually enter data or select it from the drop down list.
I'd like to be prompted with a message like "WBS not in list" when the data I
am entering in this box is not in the list. Is this possible? If so, please
let me know what I need to do. I'm still a "newbie" in Access. Thanks for
your help.
 
A

Allen Browne

Set the combo's Limit To List property to Yes.

You may also want to create a relation between the table you are entering
into and the table that contains the list of valid values. Relationships is
on the Tools menu. When you do, be sure to check the box for Referential
Integrity.
 
T

Tom Wickerath

Hi Maxine,
I have a table that contains a specific list of alpha numeric
entries of which there are no duplicates.

Approximately how many records are in this table?
In the form's box where this table
is linked, we can manually enter data or select it from the drop down list.

Why have both a text box and a combo (drop down) list? Why not just have the
combo list? A combo list offers a Not in List event procedure, which can be
used to add a new record:

Adding values to lookup tables
http://allenbrowne.com/ser-27.html

A text box does not offer this property. It could be coded, but it seems to
me like it will be easier to just go with a combo box.


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 

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