4
Contributors
3
Replies
4
Views
10 Years
Discussion Span
Last Post by epok13hart
0

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

0

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

0
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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.