Check textbox value against a table of stored values

C

Carlos

I have user ID's stored in a table. I would like to create a form with
a textbox that allows users to enter their ID's. Once they enter their
ID into a textbox, I would like to program a command button to take the
value of the textbox, check to see if the ID is in the table. If it
is, then I would like a value of true to be returned; otherwise, false.
Can someone offer some advice on that type of code?
 
M

Michel Walsh

Hi,


DCount("*", "TableNameHere", "ID=" & id )


would return 0 is the numerical value id is not under ID for the mentioned
table.




Hoping it may help,
Vanderghast, Access MVP
 

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