hi, im using msaccess as database. can u plz tel me how to delete records using vb (it should serch nad delete)
tkx

hi, im using msaccess as database. can u plz tel me how to delete records using vb (it should serch nad delete)
tkx

If you can acceess a database and retrieve a particular table from it, definetely, you can search,insert rows,delete rows/the entire table,alter,update the whole things. Why ask? Just select the appropriate keyword and its syntax. Much things are in this forum. Just give a search for it.

Happy Programming

AV Manoharan

As suggested by Manoharan you can execute any command from VB . just use connection.execute with the sql u want to execute.

private sub cmddelete_()
adodc1.recordsource="select * from employee where id " & _
"'" & txtid.text & "'"
adodc1.refresh

dim a as integer 

a=adodc1.recordset.recordcount
    if a=1 then 
          msgbox"id found ",,"id number match"
          with adodc1.recordset
                  .delete
                  .update
           end with
     msgbox"record deleted",,"employee deleted"
exit sub

end if
msgbox"no id number match with ur request",,"no file found"
end sub

im using access hope it will help you make sure properly link
put the code in the command button code for vb6.0

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.