Results 1 to 12 of 12

Thread: Remove Selected item from database when removed from listview(Resolved -Thanks!!!!! )

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2004
    Location
    Home
    Posts
    85

    Remove Selected item from database when removed from listview(Resolved -Thanks!!!!! )

    Hi All

    Need a little help with this one, I am trying to write code to remove a selected item from the database when the user selects an item in the list view and here is what I have so far

    Dim adoRemove As Recordset

    Dim vacancyid As String
    Dim code As String
    vacancyid = Form7.txtFields(0).Text
    code = ListView1.List(ListView1.ListIndex)

    Adoremove.open = "select * from tblrequired requirements where lngvacancyid = " & vacancyid And bytcode = code ,db, , adOpenStatic, adLockOptimistic

    .Delete
    .Close

    I have two columns in the listview and I want to the sql statement to get the value from the 2nd column in the listview for the selected item

    Can you help me?

    Thanks in advance
    Last edited by altf4; Jul 3rd, 2004 at 04:29 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width