Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Access 2000 DELETE FROM Not Working
Message
Information générale
Forum:
Visual Basic
Catégorie:
VBA
Divers
Thread ID:
01402857
Message ID:
01403095
Vues:
26
>>>This code is not deleting the record:
>>>
>>>
>>>
>>>Public Sub DeleteRow()
>>>
>>>    Dim sCommand As String
>>>    Dim db As Database
>>>    Set db = CurrentDb
>>>
>>>    sCommand = "DELETE FROM tblQuote_Original WHERE PK_ID = 429"
>>>    db.Execute sCommand
>>>
>>>End Sub
>>>
>>>
>>>After I run it, the record is still appearing.
>>>
>>>Anyone know what I'm doing wrong?
>>
>>Any errors?
>>
>>msgbox(err.message)
>
>No

I do not have Access2000, but it seems to me you could remove some lines from your code:
Public Sub DeleteRow()
   Dim sCommand As String
  sCommand = "DELETE FROM tblQuote_Original WHERE PK_ID = 429"
   CurrentDb.Execute sCommand
End Sub
If you wish, send to me a database example where this behavior can be reproduced.

Regards
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform