Help with validation code

DaveS

New member
Local time
Today, 21:55
Joined
Aug 6, 2002
Messages
5
I have a combo box on a form that I wish to validate using three fields in a table called "Calls". My problem is I want the form to take the number entered search through the table and if it finds the same record then to message the user. I have no idea even how to begin this, any help would be appreciated.
 
If I read you correctly this is a question of understanding first off, that you want the one table with three fields which all might contain a number you already have; in which case I think you need to look at your database design, read the DLookup posts here, and perhaps re-structure your tables as three different ones. Then DLookup will work on the field you want to validate.
 
unfortunately this is an existing database and I can not make different tables. I have a combo box on a form named "Terminals". I want the after update event to run after someone enters a terminal to chech the "Calls" table to see if this terminal is commisioned. To do this I need to verify three fields in the "Calls" table. One is the "Terminal" field, the other is "Commisioning" =True and the "End Time"=Null. If it finds this record I want a message box telling the user that the terminal is already logged in. I have tried this in code but i can not get it to run.
 

Users who are viewing this thread

Back
Top Bottom