data validation in text box

F

Faisal

i want to enter some data in text box,But i should not enter any value in
text box,The data what i enter is should same as what i predifines by using
an another table

any tips on this
Regards
Faisal
Riyadh
 
D

default105

Not sure if I follow but here goes. You have data in one table you want the
user to use and stay confined to. If this is the case use a combo box and
set up the not in list event to control the users actions. It is considered
nice to code it to allow the user to add the item to the list if it is not
there if you want them to have that capability. Hope this helps
 
F

Faisal

Deat sir,

my thanks in advance for your reply

Actually i want to know that there there is any way to control text box for
data entry ,like the combo box property limit to list set to true
 
L

Linq Adams via AccessMonster.com

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!"
 

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