Private Sub KewlButtons3_Click()
Set cmd = New ADODB.Command
Set rsACS = New ADODB.Recordset
Set rsACS2 = New ADODB.Recordset
' Establecimiento de conexion
Set cmd.ActiveConnection = cnn1
cmd.CommandText = _
"select count(*) as sCNT from alumno where partcipante = '" & Trim(Text1.Text) & "'"
rsACS.Open cmd, , adOpenDymanic, adLockBatchOptimistic
rsACS.MoveFirst
Do While Not rsACS.EOF
If (rsACS!sCNT > 0) Then
' Monitor "El ambito " & cIDAbrev & " Ya existe en la B.D."
Else
cmd.CommandText = "DELETE alumno FROM ('" & partcipante = Text1.Text & "','" & evento = Text2.Text & "','" & fecha = Text3.Text + "','" & planta = Text4.Text & "','" & turno = Text5.Text + "','" & habitacion = Text5.Text + "')"
Text1.SetFocus
rsACS2.Open cmd, , adOpenDymanic, adLockBatchOptimistic
End If
rsACS.MoveNext
Loop
rsACS.Close
Unload Me
MsgBox "Datos Eliminados"
End Sub
espero una pronat respuesta gracias.









Mode Lineal
