B
Brandon Johnson
This one has got me stumped. I cant figure out this error for the life
of me. it goes through a listbox to see what index is indeed
selected... if selected then find that name in two seperate tables and
delete them. after that, reintailize the listbox to display updated
data. Any suggestions would help. thankyou.
For i = 0 To lstNames.ListCount - 1
If lstNames.Selected(i) = True Then
If chkBM.Value = True Then
cred = "[login_name] = '" & lstNames.ItemData(i) & "'"
status.FindFirst cred
user.FindFirst cred
If MsgBox("Are you sure you want to delete user: " &
status!login_name, _
vbYesNo, "Question") = vbYes Then
status.Delete 'ERROR LOCATION****************
user.Delete
lstNames.RowSource = "SELECT login_name FROM
tblLoginPWD ORDER _ BY login_name asc;"
txtNameCount = lstNames.ListCount
Else
MsgBox "User: " & user!login_name & " was NOT
deleted.", vbInformation, _ "Information"
Exit Sub
End If
End If
End If
Next
of me. it goes through a listbox to see what index is indeed
selected... if selected then find that name in two seperate tables and
delete them. after that, reintailize the listbox to display updated
data. Any suggestions would help. thankyou.
For i = 0 To lstNames.ListCount - 1
If lstNames.Selected(i) = True Then
If chkBM.Value = True Then
cred = "[login_name] = '" & lstNames.ItemData(i) & "'"
status.FindFirst cred
user.FindFirst cred
If MsgBox("Are you sure you want to delete user: " &
status!login_name, _
vbYesNo, "Question") = vbYes Then
status.Delete 'ERROR LOCATION****************
user.Delete
lstNames.RowSource = "SELECT login_name FROM
tblLoginPWD ORDER _ BY login_name asc;"
txtNameCount = lstNames.ListCount
Else
MsgBox "User: " & user!login_name & " was NOT
deleted.", vbInformation, _ "Information"
Exit Sub
End If
End If
End If
Next