Ver Mensaje Individual
  #5 (permalink)  
Antiguo 20/08/2010, 15:10
Avatar de Lexther
Lexther
 
Fecha de Ingreso: agosto-2010
Mensajes: 8
Antigüedad: 13 años, 8 meses
Puntos: 0
Respuesta: Error "El uso de propiedad no es valido"

Modifique el nombre del campo autonumerico y con este codigo tampoco funcionó:

Código vb:
Ver original
  1. Private Sub Eliminar_Click()
  2. Dim sql$, x As Long, y As Long
  3. Dim rst As ADODB.Recordset
  4.  
  5. Set rst = New ADODB.Recordset
  6.  
  7. sql$ = "Select id From Clientes Order By Id"
  8.  
  9. With rst
  10. .CursorLocation = adUseClient
  11. .CursorType = adOpenKeyset
  12. .LockType = adLockOptimistic
  13. .Open sql$, CurrentProject.Connection, , , adCmdText
  14. End With
  15.  
  16. x = rst.RecordCount
  17. rst.MoveFirst
  18.  
  19. For y = 1 To x
  20. rst.!Id = y
  21. rst.Update
  22. rst.MoveNext
  23. Next y
  24.  
  25. Set rst = Nothing
  26. End Sub

Sale error de Compilacion - Error de Sintaxis