
Hi Adwaith.
You asked this question yesterday, and we would appreciate if you can continue the conversation in your previous question instead of creating a new one.
If the answer provided did not help, please let us know, and try to provide more details,
Thanks,

What if his primary key is not part of the insert ? What you should implement is a method to check if record exist based on some unique field prior to inserting the data if you are looking for uniqueness or just insert the record with a primary integer as an identity field which increments on each record insert.

My problem still not solved. this is the code i gave. pls correct it.
If Text1.Text = rp.Fields(0) And Text2.Text = rp.Fields(1) And Text3.Text = rp.Fields(2) Then
t = MsgBox(”Record exist”, vbOKOnly)

What type of object is “rp” ?
how are you populating it ?

Also, what version of Visual Basic are you using ?

rp is assigned to the access database file as”rp=db.openrecordset(”record”) where db is the mdb file.
VB6

















