Thanks for your comments. I am able to kind of get it to work, but not correctly. What I have found is that indexseek() will work correctly if a value is hardcoded in there - the record will be found if I type a valid value in there, the record won't be found if I type an invalid value. I have tried using the textbox.value, tried moving this to a variable, tried using quotes just in case, but when I use a variable in the indexseek() command, it doesn't work consistently. I am using SET EXACT ON so I assume it will only find the record if the exact value I type in matches what is in the file, but sometimes it reports that a record is found when it doesn't exist in the file. Maybe I am doing something stupid, but I can't see why it would work when I hardcode a value to seek and not work when I use a variable.
Thanks for your code Ramani but I can't use it because I don't want the record pointer to move. I am adding a record to the table when I am checking the value, and if I use a select statement or locate I can figure out if there is a duplicate value in the table, but then if it is a valid value and I go ahead and hit 'Save' the record isn't saved to the table. If I remove my validation, it is saved so I assume that because the record pointer moves, the record can't be added properly? That is why I wanted to use and indexseek.
Thanks for your help anyway. I may have to think of another way to do this.
Mary