How can I delete the file associated with this id? The path is not correct. Do I need to put the objRs!n_pdfname into a variable first?
VB Code:
  1. Call CreateConnection(objConn)
  2.  
  3.     Set objRs = New ADODB.Recordset
  4.  
  5.     objRs.ActiveConnection = objConn
  6.     objRs.CursorLocation = adUseClient
  7.     objRs.CursorType = adOpenDynamic
  8.     objRs.LockType = adLockOptimistic
  9.     objRs.Source = "select * from Documents where n_id='" & MSFlexGrid1.Text & "'"
  10.     objRs.Open
  11.  
  12.     Dim Msg
  13.     Msg = "Do you really want to delete this Document?"
  14.     'If user clicks the No button, stop QueryUnload.
  15.     If MsgBox(Msg, vbQuestion + vbYesNo, Me.Caption) = vbYes Then
  16.         objConn.Execute ("Delete from Documents where n_id = '" & objRs!n_id & "'")
  17.         MsgBox (objRs!n_pdfname)
  18.         MsgBox ("App.Path & "\" & "Documents" & "\" & '" & objRs!n_pdfname & "'")
  19.         'Kill  "App.Path & "\" & "Documents" & "\" & '" & objRs!n_pdfname & "'")
  20.     End If
  21.     objRs.Close
  22.     Call CloseConnection(objConn)