Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: Visual Basic
Expertise: Beginner
Oct 1, 1996



Application Security Testing: An Integral Part of DevOps

Deleting a Record from the DBListBox

How do I delete a record with the data I've selected in a DBListBox (VB4.0). If I use the e.g. Findfirst command I get the message:
"The action was cancelled by an associated object."
Would it be possible to use "SelectedItem" or "Bookmark". If, then how?

Since the DBListBox is the data source for the list, you can look at the Data.Recordset property, and use it like a Dynaset. For instance, if you wanted to delete the record from your box that had the word "Lego" from a field named "Name", you could do the following:

Data.Recordset.FindFirst "Name = 'Lego'"
That should work without any problems.
DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date