Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Access 2000 DELETE FROM Not Working
Message
General information
Forum:
Visual Basic
Category:
VBA
Miscellaneous
Thread ID:
01402857
Message ID:
01403095
Views:
27
>>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform