Updating sql database from a listbox

Rated 3.92/5 based on 655 customer reviews

Here’s the code that is responsible for implementing this algorithm: Private Sub btndelete_Click() Dim dbs As DAO. Database, sql As String, r Count As Integer Set dbs = Current Db If recid. Records Affected If r Count 0 Then Msg Box "Contact has been deleted" 'update listbox con Info.

This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. By joining today you can post your own programming questions, respond to other developers questions, and eliminate the ads that are displayed to guests. I am attempting to fill a listbox with records from a database table and cannot seem to figure it out. Then click on the update button that has the following code: Private Sub Command11_Click() Dim dbs As DAO. If you are new to Visual Basic programming with version 2005, this is the place to start your questions. Caption = "" End If End If End Sub If the user did not select a record then they get a message saying "Please select a contact to delete". Database, sql As String, r Count As Integer Set dbs = Current Db sql = "UPDATE contact SET name=" & txtname.

Leave a Reply