[RESOLVED] ADO Control - Check if a Certain Record Doesn't Exist
My program allows users to create new records by clicking a command button. A series of input boxes appear so the user can enter the details. However, for the first input box, I want the user to enter a ColleagueID record, and if it exists, it will ask the user to try again.
How do I make such a check? Using SQL?
Re: ADO Control - Check if a Certain Record Doesn't Exist
Run a SELECT query for what was input.
If a record is returned, you know it exists. If no records are returned you know it does not exist.
You could also do a SELECT COUNT for what was input. If the return is greater than 0 then it exists. If it is 0 then it doesn't.
Re: ADO Control - Check if a Certain Record Doesn't Exist
Thanks a lot - you've both resolved this. :)