I have a list box on my form that shows the results of a query based on a selection made in a combo box on that same form.
I want to be able to make edits to the records by selecting items in the list box.
So far I can't seem to make it work.
I have this piece of code, but I am not sure how to adjust it to a list box:
Private Sub DeleteRecord_Click()
Dim strSQL As String
strSQL = "DELETE [Teamid] and [STOID] FROM TeamSTO WHERE " & _
"TeamSTO.[TeamID] = '" & Me![lstExitingTeam] & "'" And "TeamSTO.[STOid] = '" & Me![CmbSTO]
CurrentDb.Execute strSQL, dbFailOnError
Me![EventList].Requery ' requery the list
Although, this code is just to delete the item.
That might be enough, but I would really like the user to be able to edit the records as well.