View Single Post
  #4  
Old May 3rd, 2008, 06:37 PM posted to microsoft.public.access.forms
Linq Adams via AccessMonster.com
external usenet poster
 
Posts: 1,474
Default data validation in text box

In the BeforeUpdate event of your textbox use the DLookup() function to
insure that the value entered is present in the table. If the value isn't
found in the table

Cancel = True
Msgbox "Value not found! Try again!"

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200805/1