PDA

Click to See Complete Forum and Search --> : adding new records to ADO and checking for existing ones


antnee
Aug 18th, 1999, 12:09 AM
I am trying to add new records thru a form using ADO to an Acess 97 db but I need to check to see if the id I enter already exists before entering it. Is there a way to search for a value in a db and return either true or false?

for example before entering a new cust and custid check to see if they exist before adding.


Yes I have the id set up as the primary key but I am trying to control it in vb not access. May if it exists I will prompt user with a message box stating that the record already exists.

I need to be able to search for records.

[This message has been edited by antnee (edited 08-19-1999).]

Skrmetti
Aug 18th, 1999, 03:49 PM
Do you just want to make sure that you do not input duplicate id numbers? In that case, just go into access and set the appropriate fields to unique. Then the database won't let you input duplicate id's.

HTH
Jonathan